Re: [PATCH 1/2] pathspec magic: add '^' as alias for '!'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 8, 2017, 23:05 UTC
- Message-ID
- <xmqq37fouvu3.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170208223532.GB108686@google.com>
Brandon Williams <bmwill@google.com> writes:
Show 7 quoted lines
> git cmd -- :^dir > > would produce some output which says: > ':^dir': pathspec magic not supported by this command: 'exclude' (mnemonic: '!') > > And the user may scratch their head for a second since they didn't > supply the '!' character, but rather '^'.
Yup, I am tempted to tweak Cornelius's glossary fixup and squash this into the series, for two purposes.
- it makes it clear that '^' and '!' mean the same thing (and clearer than Cornelius's original, "! or ^", which could leave the reader wondering "ok there are two ways to say negative; do they subtly mean different things?").
- it hints that '!' is the more official spelling, making the output you showed above acceptable.
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index 8ad29e61a9..822ca83264 100644 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@ -386,8 +386,8 @@ Glob magic is incompatible with literal magic. exclude;; After a path matches any non-exclude pathspec, it will be run - through all exclude pathspec (magic signature: `!`). If it - matches, the path is ignored. + through all exclude pathspec (magic signature: `!` or its + synonym `^`). If it matches, the path is ignored. -- [[def_parent]]parent::