describe: teach describe negative pattern matches
Teach git-describe the `--exclude` option which will allow specifying a glob pattern of tags to ignore. This can be combined with the `--match` patterns to enable more flexibility in determining which tags to consider. For example, suppose you wish to find the first official release tag that contains a certain commit. If we assume that official release tags are of the form "v*" and pre-release candidates include "*rc*" in their name, we can now find the first release tag that introduces the commit abcdef: git describe --contains --match="v*" --exclude="*rc*" abcdef Add documentation, tests, and completion for this change. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
43f8080eaf
commit
77d21f29ea
@ -1198,6 +1198,7 @@ _git_describe ()
|
||||
__gitcomp "
|
||||
--all --tags --contains --abbrev= --candidates=
|
||||
--exact-match --debug --long --match --always
|
||||
--exclude
|
||||
"
|
||||
return
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user