Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 5/5] rev-parse: introduce --exclude=<glob> to tame wildcards

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:10

Eric Sunshine [off-list ref] writes:
On Fri, Nov 1, 2013 at 3:34 PM, Junio C Hamano [off-list ref] wrote:
quoted
Teach "rev-parse" the same "I'm going to glob, but omit the ones
that match these patterns" feature as "rev-list".

Signed-off-by: Junio C Hamano <redacted>
---
 Documentation/git-rev-parse.txt | 14 ++++++++++++++
 builtin/rev-parse.c             | 17 +++++++++++++++++
 t/t6018-rev-list-glob.sh        | 12 ++++++++++++
 3 files changed, 43 insertions(+)
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 2b126c0..d4639a2 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -155,6 +155,20 @@ shown.  If the pattern does not contain a globbing character (`?`,
        character (`?`, `*`, or `[`), it is turned into a prefix
        match by appending `/*`.

+--exclude=<glob-pattern>::
+       Do not include refs matching '<glob-pattern>' that the next `--all`,
+       `--branches`, `--tags`, `--remotes`, or `--glob` would otherwise
+       consider. Repetitions of this option accumulate exclusion patterns
+       up to the next `--all`, `--branches`, `--tags`, `--remotes`, or
+       `--glob` option (other options or arguments do not clear
+       accumlated patterns).
++
+The patterns given should not begin with `refs/heads`, `refs/tags`, or
+`refs/remotes` when applied to `--branches`, `--tags`, or `--remotes`,
+restrictively, and they must begin with `refs/` when applied to `--glob`
Did you mean s/restrictively/respectively/ ?
I guess so; it was "cut&paste without thinking" from [Patch 2/5] ;-).
quoted
+or `--all`. If a trailing '/{asterisk}' is intended, it must be given
+explicitly.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help