Re: [PATCH] Documentation: improve description of --glob=pattern and friends
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 22, 2010, 00:51 UTC
- Message-ID
- <7v1vhjj72d.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <e2e992cfb93335b400fd9ec67c6d38cb0157b006.1264119524.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 12 quoted lines
> Consolidate the descriptions of --branches, --tags and --remotes a > bit, to make it less repetitive. Improve the grammar a bit, and spell > out the meaning of the 'append /*' rule. > > Signed-off-by: Thomas Rast <trast@student.ethz.ch> > --- > > Compared to the earlier draft, I changed "it is anchored" (by > appending '/*') to "it is turned into a prefix match", since this is > not anchoring in the ^regex$ sense. (I guess 'leading-component > match' would be even more accurate, but that makes the sentence > unwieldy in my ears.)
By the way, we may someday want to change that to do FNM_PATHNAME instead of just a flat glob.
Incidentally, that is why I prefer the earlier suggestion to do "check with memcmp() if it is a path-prefix, and if it fails, then give fnmatch(FNM_PATHNAME) a chance". That way, we don't have to say "by appending '/*'" (which is an implementation detail we can change).
It seems that the suggestion was ignored, though.