Skip to content

Commit

Permalink
cli: add short -b option for --branch in jj git fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
zummenix committed Feb 11, 2024
1 parent 416bde2 commit dce99cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `jj show` now accepts `-T`/`--template` option to render its output using
template

* `jj git fetch` now accepts `-b` as a shorthand for `--branch`, making it more
consistent with other commands that accept a branch

### Fixed bugs

* On Windows, symlinks in the repo are now materialized as regular files in the
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub struct GitFetchArgs {
///
/// By default, the specified name matches exactly. Use `glob:` prefix to
/// expand `*` as a glob. The other wildcard characters aren't supported.
#[arg(long, default_value = "glob:*", value_parser = parse_string_pattern)]
#[arg(long, short, default_value = "glob:*", value_parser = parse_string_pattern)]
branch: Vec<StringPattern>,
/// The remote to fetch from (only named remotes are supported, can be
/// repeated)
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ Fetch from a Git remote
###### **Options:**
* `--branch <BRANCH>` — Fetch only some of the branches
* `-b`, `--branch <BRANCH>` — Fetch only some of the branches
Default value: `glob:*`
* `--remote <remote>` — The remote to fetch from (only named remotes are supported, can be repeated)
Expand Down

0 comments on commit dce99cf

Please sign in to comment.