First of all I would like to thank you all for the great tool that is
git. I love it and it makes my days way better.
This is my first post on this mailing list so please apology if there
is something wrong.
I have noticed a regression in the behavior of ignore rules in 1.8.3.
I have read the release notes and it might be related to all the great
optimization you guys have done.
My use case is quite uncommon but may happens to people who are
tracking their "dot files" like I do.
Basically I have a whitelist of non-ignored files at the top of my
repository and a blacklist of ignored file in some of the direct
$ cd /tmp
$ mkdir repo
$ cd repo
$ git init
$ mkdir d
$ touch tracked d/tracked
$ git add tracked d/tracked
$ git commit -m "Initial commit"
$ touch untracked d/untracked
$ touch ignored d/ignored
$ echo '/*' >> .gitignore
$ echo '!/d/' >> .gitignore
$ echo '!/*' >> d/.gitignore
$ echo 'ignored' >> d/.gitignore
$ cat .gitignore
$ cat d/.gitignore
$ git --version
git version 1.8.3
$ git status -sb
$ /usr/local/Cellar/git/220.127.116.11/bin/git --version
git version 18.104.22.168
$ /usr/local/Cellar/git/22.214.171.124/bin/git status -sb
$ git config status.showUntrackedFiles
$ git check-ignore -v d/ignored
$ /usr/local/Cellar/git/126.96.36.199/bin/git check-ignore -v d/ignored
Although I am confused by the fact that both version of check-ignore
print the same result, my understanding of this behavior is that the
"local" d/.gitignore file is not taken into account and that once a
negate rule is set I can not include other sub-pattern any longer. I
have tried to only use the root .gitignore file like this
but I have the same result. Removing the trailing slash in the
negative pattern (like this !/d) does not change anything. If I use
!/d/*, both version of git-status no longer report d/untracked.
I was happy with the 188.8.131.52 behavior. Maybe I misunderstand the new
behavior of 1.8.3. If yes please tell me how I could achieve the same
tricks in 1.8.3 because I did not find out how.
I have the same result with the next branch (version 184.108.40.2060.gc6abf3f).
I have never hacked into git code base but I am willing to help if
someone can guide me a bit.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html