{"thread":{"id":"33972","subject":"git ignore regression in 1.8.3","startedAt":"2013-05-29T12:31:46Z","lastAt":"2013-05-29T13:54:03Z","messageCount":4,"participants":["Nicolas Desprès","Duy Nguyen","Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"218812","messageId":"CAPqtr1KjmqRZZuVwput6=rKJrivb7siYePqT5QEOLJApg+phEg@mail.gmail.com","threadId":"33972","inReplyTo":null,"subject":"git ignore regression in 1.8.3","fromName":"Nicolas Desprès","fromEmail":"nicolas.despres@gmail.com","sentAt":"2013-05-29T12:31:46Z","receivedAt":"2013-05-29T12:31:46Z","isPatch":false,"sender":{"key":"nicolas.despres@gmail.com","avatar":null},"body":"Hi all,\n\nFirst of all I would like to thank you all for the great tool that is\ngit. I love it and it makes my days way better.\nThis is my first post on this mailing list so please apology if there\nis something wrong.\n\nI have noticed a regression in the behavior of ignore rules in 1.8.3.\nI have read the release notes and it might be related to all the great\noptimization you guys have done.\nMy use case is quite uncommon but may happens to people who are\ntracking their \"dot files\" like I do.\nBasically I have a whitelist of non-ignored files at the top of my\nrepository and a blacklist of ignored file in some of the direct\nsub-directories.\n\nExample:\n$ cd /tmp\n$ mkdir repo\n$ cd repo\n$ git init\n$ mkdir d\n$ touch tracked d/tracked\n$ git add tracked d/tracked\n$ git commit -m \"Initial commit\"\n$ touch untracked d/untracked\n$ touch ignored d/ignored\n$ echo '/*' >> .gitignore\n$ echo '!/d/' >> .gitignore\n$ echo '!/*' >> d/.gitignore\n$ echo 'ignored' >> d/.gitignore\n$ cat .gitignore\n/*\n!/d/\n$ cat d/.gitignore\n!/*\nignored\n$ git --version\ngit version 1.8.3\n$ git status -sb\n## master\n?? d/.gitignore\n?? d/ignored\n?? d/untracked\n$ /usr/local/Cellar/git/1.8.2.3/bin/git --version\ngit version 1.8.2.3\n$ /usr/local/Cellar/git/1.8.2.3/bin/git status -sb\n## master\n?? d/.gitignore\n?? d/untracked\n$ git config status.showUntrackedFiles\n$ git check-ignore -v d/ignored\n.gitignore:2:!/d/ d/ignored\n$ /usr/local/Cellar/git/1.8.2.3/bin/git check-ignore -v d/ignored\n.gitignore:2:!/d/ d/ignored\n\nAlthough I am confused by the fact that both version of check-ignore\nprint the same result, my understanding of this behavior is that the\n\"local\" d/.gitignore file is not taken into account and that once a\nnegate rule is set I can not include other sub-pattern any longer. I\nhave tried to only use the root .gitignore file like this\n\n/*\n!/d/\n/d/ignored\n\nbut I have the same result. Removing the trailing slash in the\nnegative pattern (like this !/d) does not change anything. If I use\n!/d/*, both version of git-status no longer report d/untracked.\n\nI was happy with the 1.8.2.3 behavior. Maybe I misunderstand the new\nbehavior of 1.8.3. If yes please tell me how I could achieve the same\ntricks in 1.8.3 because I did not find out how.\nI have the same result with the next branch (version 1.8.3.430.gc6abf3f).\n\nI have never hacked into git code base but I am willing to help if\nsomeone can guide me a bit.\n\nRegards,\n\n--\nNicolas Desprès\n"},{"id":"218828","messageId":"CACsJy8BT_3aUAO+eMT6F3SWwLOWeFwJ2rxxru-+NtBRD3RTSFw@mail.gmail.com","threadId":"33972","inReplyTo":"CAPqtr1KjmqRZZuVwput6=rKJrivb7siYePqT5QEOLJApg+phEg@mail.gmail.com","subject":"Re: git ignore regression in 1.8.3","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-05-29T13:31:04Z","receivedAt":"2013-05-29T13:31:04Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, May 29, 2013 at 7:31 PM, Nicolas Desprès\n<nicolas.despres@gmail.com> wrote:\n> I have noticed a regression in the behavior of ignore rules in 1.8.3.\n\nYeah, it looks like everybody suddenly realizes this regression soon\nafter the release, not before :( This has been reported three times so\nfar. You may want to check the discussion (and hopefully progress\nsoon) in this thread:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/225675/focus=225713\n\nWe really need to add some real world use cases of gitignore in the test suite.\n--\nDuy\n"},{"id":"218834","messageId":"CAMP44s2mstQOzrtR2tWxNTKE2b+_0xE0a2UtFCtpX-2H6m3JoQ@mail.gmail.com","threadId":"33972","inReplyTo":"CACsJy8BT_3aUAO+eMT6F3SWwLOWeFwJ2rxxru-+NtBRD3RTSFw@mail.gmail.com","subject":"Re: git ignore regression in 1.8.3","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-29T13:43:55Z","receivedAt":"2013-05-29T13:43:55Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Wed, May 29, 2013 at 8:31 AM, Duy Nguyen <pclouds@gmail.com> wrote:\n> On Wed, May 29, 2013 at 7:31 PM, Nicolas Desprès\n> <nicolas.despres@gmail.com> wrote:\n>> I have noticed a regression in the behavior of ignore rules in 1.8.3.\n>\n> Yeah, it looks like everybody suddenly realizes this regression soon\n> after the release, not before :(\n\nThat's because the vast majority of users only use the releases (maybe\nmore than 90%?). It's not a big deal, that's what 1.8.3.1 is for :)\n(also, that's why we shouldn't worry to death about imaginary users,\nour real users will gladly point out when we have screwed up).\n\n-- \nFelipe Contreras\n"},{"id":"218840","messageId":"CAPqtr1KUArgPQJ-+UGsjZdtekVwneXX8qWzREkHqOqykTr8L3w@mail.gmail.com","threadId":"33972","inReplyTo":"CACsJy8BT_3aUAO+eMT6F3SWwLOWeFwJ2rxxru-+NtBRD3RTSFw@mail.gmail.com","subject":"Re: git ignore regression in 1.8.3","fromName":"Nicolas Desprès","fromEmail":"nicolas.despres@gmail.com","sentAt":"2013-05-29T13:54:03Z","receivedAt":"2013-05-29T13:54:03Z","isPatch":false,"sender":{"key":"nicolas.despres@gmail.com","avatar":null},"body":"On Wed, May 29, 2013 at 3:31 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> On Wed, May 29, 2013 at 7:31 PM, Nicolas Desprès\n> <nicolas.despres@gmail.com> wrote:\n>> I have noticed a regression in the behavior of ignore rules in 1.8.3.\n>\n> Yeah, it looks like everybody suddenly realizes this regression soon\n> after the release, not before :( This has been reported three times so\n> far. You may want to check the discussion (and hopefully progress\n> soon) in this thread:\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/225675/focus=225713\n>\n\nOups! I'm sorry I searched the archives but did not find this one.\nThanks for your reply and the link\n\n> We really need to add some real world use cases of gitignore in the test suite.\n\nThere is kind of one included in to my post (minus the assert statements).\n\n--\nNicolas Desprès\n"}]}