Merge branch 'nd/gitignore-trailing-whitespace'
authorJunio C Hamano <gitster@pobox.com>
Fri, 14 Mar 2014 21:23:37 +0000 (14:23 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Mar 2014 21:23:37 +0000 (14:23 -0700)
Trailing whitespaces in .gitignore files, unless they are quoted for
fnmatch(3), e.g. "path\ ", are warned and ignored.

Strictly speaking, this is a backward incompatible change, but very
unlikely to bite any sane user and adjusting should be obvious and
easy.

* nd/gitignore-trailing-whitespace:
  t0008: skip trailing space test on Windows
  dir: ignore trailing spaces in exclude patterns
  dir: warn about trailing spaces in exclude patterns

1  2 
Documentation/gitignore.txt
dir.c

@@@ -77,12 -77,13 +77,15 @@@ PATTERN FORMA
     Put a backslash ("`\`") in front of the first hash for patterns
     that begin with a hash.
  
+  - Trailing spaces are ignored unless they are quoted with backlash
+    ("`\`").
   - An optional prefix "`!`" which negates the pattern; any
     matching file excluded by a previous pattern will become
 -   included again.  If a negated pattern matches, this will
 -   override lower precedence patterns sources.
 +   included again. It is not possible to re-include a file if a parent
 +   directory of that file is excluded. Git doesn't list excluded
 +   directories for performance reasons, so any patterns on contained
 +   files have no effect, no matter where they are defined.
     Put a backslash ("`\`") in front of the first "`!`" for patterns
     that begin with a literal "`!`", for example, "`\!important!.txt`".
  
diff --cc dir.c
Simple merge