From: Junio C Hamano Date: Fri, 14 Mar 2014 21:23:37 +0000 (-0700) Subject: Merge branch 'nd/gitignore-trailing-whitespace' X-Git-Tag: v2.0.0-rc0~133 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfcd354cdf38ff119c05e6e5f0e434bbc163ba41;p=thirdparty%2Fgit.git Merge branch 'nd/gitignore-trailing-whitespace' 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 --- dfcd354cdf38ff119c05e6e5f0e434bbc163ba41 diff --cc Documentation/gitignore.txt index b08d34d84e,aa776234e1..8734c1566c --- a/Documentation/gitignore.txt +++ b/Documentation/gitignore.txt @@@ -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`".