Skip to content

Commit e3af72c

Browse files
committedFeb 27, 2013
Merge branch 'gp/forbid-describe-all-match' into pu
Not sure if we should forbid the combination or explain the semantics better, perhaps by giving a better synonym to "--all", which meant "disable the usual limit that only gives the annotated tags". * gp/forbid-describe-all-match: describe: make --all and --match=PATTERN mutually incompatible
2 parents bfd29f5 + aef6b6c commit e3af72c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎Documentation/git-describe.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ OPTIONS
8383
--match <pattern>::
8484
Only consider tags matching the given `glob(7)` pattern,
8585
excluding the "refs/tags/" prefix. This can be used to avoid
86-
leaking private tags from the repository.
86+
leaking private tags from the repository. This option is
87+
incompatible with `--all`.
8788

8889
--always::
8990
Show uniquely abbreviated commit object as fallback.

‎builtin/describe.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
435435
if (longformat && abbrev == 0)
436436
die(_("--long is incompatible with --abbrev=0"));
437437

438+
if (pattern && all)
439+
die(_("--match is incompatible with --all"));
440+
438441
if (contains) {
439442
const char **args = xmalloc((7 + argc) * sizeof(char *));
440443
int i = 0;

0 commit comments

Comments
 (0)
Please sign in to comment.