summaryrefslogtreecommitdiff
path: root/Documentation/git-name-rev.txt
diff options
context:
space:
mode:
authorLibravatar Jacob Keller <jacob.keller@gmail.com>2017-01-18 15:06:06 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-23 18:33:17 -0800
commit96415b49dc4e10b64c014516a3f7cd9a51ed5269 (patch)
tree176b007e96a7cc390e217e2c8a1950ae2c7b6eef /Documentation/git-name-rev.txt
parentname-rev: extend --refs to accept multiple patterns (diff)
downloadtgif-96415b49dc4e10b64c014516a3f7cd9a51ed5269.tar.xz
name-rev: add support to exclude refs by pattern match
Extend git-name-rev to support excluding refs which match shell patterns using --exclude. These patterns can be used to limit the scope of refs by excluding any ref that matches one of the --exclude patterns. A ref will only be used for naming when it matches at least one --refs pattern but does not match any of the --exclude patterns. Thus, --exclude patterns are given precedence over --refs patterns. For example, suppose you wish to name a series of commits based on an official release tag of the form "v*" but excluding any pre-release tags which match "*rc*". You can use the following to do so: git name-rev --refs="v*" --exclude="*rc*" --all Add tests and update Documentation 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-name-rev.txt')
-rw-r--r--Documentation/git-name-rev.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index 7433627db1..e8e68f528c 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -30,6 +30,15 @@ OPTIONS
given multiple times, use refs whose names match any of the given shell
patterns. Use `--no-refs` to clear any previous ref patterns given.
+--exclude=<pattern>::
+ Do not use any ref whose name matches a given shell pattern. The
+ pattern can be one of branch name, tag name or fully qualified ref
+ name. If given multiple times, a ref will be excluded when it matches
+ any of the given patterns. When used together with --refs, a ref will
+ be used as a match only when it matches at least one --refs pattern and
+ does not match any --exclude patterns. Use `--no-exclude` to clear the
+ list of exclude patterns.
+
--all::
List all commits reachable from all refs