Re: Bug in .gitignore handling
- From
- Tommy Thorn <tommy-git@thorn.ws>
- Date
- Mar 26, 2008, 20:26 UTC
- Message-ID
- <47EAB187.4070009@thorn.ws>
- In-Reply-To
- <7vhcetck5m.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
> Are you talking about d6b8fc3 (gitignore(5): Allow "foo/" in ignore list > to match directory "foo", 2008-01-31), specifically this part of the > manual? >
Yes, thanks.
Show 6 quoted lines
> "git clean" has always been an ugly and unreliable stepchild, and I would > not be surprised at all if it is ridden with corner case bugs, especially > around the area to skip untracked directories; but in this case you are > not dealing with a directory but a symlink, and it should not get confused > by the fact that the symlink happens to point at a directory. >
Thanks, but first step is in ensuring that my understanding is correct. Here's the gist of the test case:
mkdir mydir cd mydir git init mkdir mousetrap touch mousetrap/nonempty git add mousetrap/nonempty git commit -m "initial" ln -s ../otherdir/foo . echo "foo/" > .gitignore echo ".gitignore" >> .gitignore git clean -n -f -d
I expect the last command to report "Would remove mousetrap/foo/", but I currently get "Would remove foo".
Thanks, Tommy