{"thread":{"id":"22953","subject":"Regression in `git add' in 1.7's 48ffef966c with a wildcard in .gitignore","startedAt":"2010-03-08T17:08:23Z","lastAt":"2010-03-08T20:21:19Z","messageCount":4,"participants":["Ævar Arnfjörð Bjarmason","Michael J Gruber","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"136398","messageId":"51dd1af81003080908i3bc94f27lc99e146bb57993ba@mail.gmail.com","threadId":"22953","inReplyTo":null,"subject":"Regression in `git add' in 1.7's 48ffef966c with a wildcard in .gitignore","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-03-08T17:08:23Z","receivedAt":"2010-03-08T17:08:23Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"I've discovered a regression in git-add the 1.7 release which I can't\nsee reported anywhere. It was introduced in\n48ffef966c762578eb818c0c54a7e11dd054f5db by Junio C Hamano at Fri Jan\n8 23:05:41 2010.\n\nThe problem is that when you have a .gitignore file with * in it\ngit-add will only complain that you're trying to add ignored files if\nthey're in the top level of your repository, for files in\nsubdirectories it now just silently fails:\n\n    $ mkdir test && cd test && git init\n    $ echo \"*\" > .gitignore\n    $ mkdir directory && touch foo directory/foo\n\nSo far so good, now if I try to add 'foo' I get an error from both 1.6 and 1.7:\n\n    $ git add foo\n    The following paths are ignored by one of your .gitignore files:\n    foo\n\nBut 1.7 just silently fails to add directory/foo to the index:\n\n    $ git add directory/foo\n    $ echo $?\n    0\n\n1.6 however does the right thing:\n\n    $ git add directory/foo\n    The following paths are ignored by one of your .gitignore files:\n    directory/foo\n    $ echo $?\n    128\n\nA test script / bisect script I used is available at\ngit://github.com/avar/git-add-fail.git I couldn't figure out how to\nturn it into a Git test.\n"},{"id":"136405","messageId":"4B9558AA.90907@drmicha.warpmail.net","threadId":"22953","inReplyTo":"51dd1af81003080908i3bc94f27lc99e146bb57993ba@mail.gmail.com","subject":"Re: Regression in `git add' in 1.7's 48ffef966c with a wildcard in .gitignore","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-03-08T20:06:02Z","receivedAt":"2010-03-08T20:06:02Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Ævar Arnfjörð Bjarmason venit, vidit, dixit 08.03.2010 18:08:\n> I've discovered a regression in git-add the 1.7 release which I can't\n> see reported anywhere. It was introduced in\n> 48ffef966c762578eb818c0c54a7e11dd054f5db by Junio C Hamano at Fri Jan\n> 8 23:05:41 2010.\n> \n> The problem is that when you have a .gitignore file with * in it\n> git-add will only complain that you're trying to add ignored files if\n> they're in the top level of your repository, for files in\n> subdirectories it now just silently fails:\n> \n>     $ mkdir test && cd test && git init\n>     $ echo \"*\" > .gitignore\n>     $ mkdir directory && touch foo directory/foo\n\nCould this possibly be fixed by 13bb0ce (builtin-add: fix exclude\nhandling, 2010-02-28) which is on pu?\n\nMichael\n"},{"id":"136407","messageId":"7vzl2ir2ep.fsf@alter.siamese.dyndns.org","threadId":"22953","inReplyTo":"51dd1af81003080908i3bc94f27lc99e146bb57993ba@mail.gmail.com","subject":"Re: Regression in `git add' in 1.7's 48ffef966c with a wildcard in .gitignore","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-08T20:20:30Z","receivedAt":"2010-03-08T20:20:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I think this is the same one as what we discussed earlier.  Does 13bb0ce\n(builtin-add: fix exclude handling, 2010-02-28) that is already queued in\n'pu' help?\n"},{"id":"136408","messageId":"51dd1af81003081221xfd1a383tb411eeb1146bc67@mail.gmail.com","threadId":"22953","inReplyTo":"4B9558AA.90907@drmicha.warpmail.net","subject":"Re: Regression in `git add' in 1.7's 48ffef966c with a wildcard in .gitignore","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-03-08T20:21:19Z","receivedAt":"2010-03-08T20:21:19Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Mar 8, 2010 at 20:06, Michael J Gruber <git@drmicha.warpmail.net> wrote:\n> Ævar Arnfjörð Bjarmason venit, vidit, dixit 08.03.2010 18:08:\n> Could this possibly be fixed by 13bb0ce (builtin-add: fix exclude\n> handling, 2010-02-28) which is on pu?\n\nYes. I just compiled pu and the issue with git-add is indeed fixed in\n13bb0ce, thanks.\n"}]}