]> granicus.if.org Git - git/commitdiff
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

index b08d34d84ec92eec6aa54572e3823062424c23bf,aa776234e145f5f65a6f0137df5dc2c4a8e1c7ac..8734c1566ca918e8c62f759aebdf7d0b497e860b
@@@ -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