diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-05-25 16:42:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-05-25 16:42:47 -0700 |
commit | 18254f14f26845c8a2bc7ca7d934855068eb3257 (patch) | |
tree | 1d17cac2cb12d3529c88ce329fa89d85fc87fb78 /builtin/show-branch.c | |
parent | 296bdc4f36f62590c7cb4f709ab7fc1f2e507d19 (diff) | |
parent | 41c64ae0e762d2c4ef1ddd578b8992967547dc5f (diff) | |
download | git-18254f14f26845c8a2bc7ca7d934855068eb3257.tar.gz |
Merge branch 'jc/show-branch-g-current'
The "--current" option of "git show-branch" should have been made
incompatible with the "--reflog" mode, but this was not enforced,
which has been corrected.
* jc/show-branch-g-current:
show-branch: -g and --current are incompatible
Diffstat (limited to 'builtin/show-branch.c')
-rw-r--r-- | builtin/show-branch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c index 330b0553b9..64c649c6a2 100644 --- a/builtin/show-branch.c +++ b/builtin/show-branch.c @@ -712,6 +712,10 @@ int cmd_show_branch(int ac, const char **av, const char *prefix) "--all/--remotes/--independent/--merge-base"); } + if (with_current_branch && reflog) + die(_("options '%s' and '%s' cannot be used together"), + "--reflog", "--current"); + /* If nothing is specified, show all branches by default */ if (ac <= topics && all_heads + all_remotes == 0) all_heads = 1; |