diff options
author | Jacob Keller <jacob.keller@gmail.com> | 2017-01-18 15:06:08 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-23 18:33:17 -0800 |
commit | 77d21f29eaddb1fbe82e013ea42d4e0180bbdda2 (patch) | |
tree | 589f2e6d1fc2efdddc2c00c7d6f21babb9eba369 /Documentation/git-describe.txt | |
parent | 43f8080eaff82e7aedaec5aa3abfd115cf1af695 (diff) | |
download | git-77d21f29eaddb1fbe82e013ea42d4e0180bbdda2.tar.gz |
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>
Diffstat (limited to 'Documentation/git-describe.txt')
-rw-r--r-- | Documentation/git-describe.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 7ad41e2f6a..8755f3af7b 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -88,6 +88,16 @@ OPTIONS patterns will be considered. Use `--no-match` to clear and reset the list of patterns. +--exclude <pattern>:: + Do not consider tags matching the given `glob(7)` pattern, excluding + the "refs/tags/" prefix. This can be used to narrow the tag space and + find only tags matching some meaningful criteria. If given multiple + times, a list of patterns will be accumulated and tags matching any + of the patterns will be excluded. When combined with --match a tag will + be considered when it matches at least one --match pattern and does not + match any of the --exclude patterns. Use `--no-exclude` to clear and + reset the list of patterns. + --always:: Show uniquely abbreviated commit object as fallback. |