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

Re: [PATCH] Documentation: enhance gitignore whitelist example

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

Eric Blake [off-list ref] writes:
On 04/05/2011 03:15 PM, Johannes Sixt wrote:
quoted
quoted
quoted
@@ -87,7 +89,8 @@ PATTERN FORMAT

  - Otherwise, git treats the pattern as a shell glob suitable
    for consumption by fnmatch(3) with the FNM_PATHNAME flag:
-   wildcards in the pattern will not match a / in the pathname.
+   wildcards in the pattern will not match a / in the pathname,
+   and do not ignore files with a leading . in the pathname.
I don't think this is correct. * matches .gitignore. I tried it.
That was my point.  * _does_ match .gitignore, even though for normal
shell globs, FNM_PERIOD is set and * does not match .gitignore.  That
is, while in the shell 'dir/*' only matches non-dot files, in .gitignore
it matches all files including dot-files.

Any ideas for a better way to word that?
Instead of "and do not ignore files with a leading", say "but will match
a dot '.'".  You are talking about the rule for wildcards to match or not
to match the pathname and there is no room for the word "ignore" to come
into play in this sentence.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help