From: Eric Sunshine Date: Fri, 01 Nov 2013 19:43:45 GMT Subject: Re: [PATCH 5/5] rev-parse: introduce --exclude= to tame wildcards Message-ID: In-Reply-To: <1383334455-18623-4-git-send-email-gitster@pobox.com> On Fri, Nov 1, 2013 at 3:34 PM, Junio C Hamano wrote: > 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 > --- > 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=:: > + Do not include refs matching '' 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/ ? > +or `--all`. If a trailing '/{asterisk}' is intended, it must be given > +explicitly.