aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-name-rev.txt
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2017-01-18 15:06:05 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-23 18:33:17 -0800
commit290be6674a4c89594105faa19061523e7380d586 (patch)
treed94004e4b7b6c4a1e6d6700b6549c52b8d6c4e85 /Documentation/git-name-rev.txt
parent4a68748893e62d66ebab1591f6da91eeb18d08e9 (diff)
downloadgit-290be6674a4c89594105faa19061523e7380d586.tar.gz
name-rev: extend --refs to accept multiple patterns
Teach git name-rev to take multiple --refs stored as a string list of patterns. The list of patterns will be matched inclusively, and each ref only needs to match one pattern to be included. A ref will only be excluded if it does not match any of the given patterns. Additionally, if any of the patterns would allow abbreviation, then we will abbreviate the ref, even if another pattern is more strict and would not have allowed abbreviation on its own. Add tests and documentation for this change. The tests expected output is dynamically generated. This is in order to avoid hard-coding a commit object name in the test results (as the expected output is to simply leave the commit object unnamed). 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.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index ca28fb8e2a..7433627db1 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -26,7 +26,9 @@ OPTIONS
--refs=<pattern>::
Only use refs whose names match a given shell pattern. The pattern
- can be one of branch name, tag name or fully qualified ref name.
+ can be one of branch name, tag name or fully qualified ref name. If
+ given multiple times, use refs whose names match any of the given shell
+ patterns. Use `--no-refs` to clear any previous ref patterns given.
--all::
List all commits reachable from all refs