Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-05-01 Thread Junio C Hamano
Samuel Lijin writes: > After some more digging (and familiarizing myself with the > behind-the-scenes logic) the issue is that dir.c has this implicit > assumption that a directory which contains only untracked and ignored > files should itself be considered untracked. While

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-05-01 Thread Samuel Lijin
After some more digging (and familiarizing myself with the behind-the-scenes logic) the issue is that dir.c has this implicit assumption that a directory which contains only untracked and ignored files should itself be considered untracked. While that works fine for use cases where we're asking if

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-05-01 Thread Samuel Lijin
On Sun, Apr 30, 2017 at 8:56 PM, Chris Johnson wrote: > Good assessment/understanding of the issue. git clean -n does not > report anything as being targeted for removal, and git clean -f > matches that behavior. I agree with it probably being related > specifically to

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-04-30 Thread Junio C Hamano
Chris Johnson writes: > Also, and sorry for the noise, but I did a reply-all here, but will a > reply automatically include the rest of the list? Or was reply-all the > right move? The convention around here is to do reply-all (in other words, make sure that Cc: line

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-04-30 Thread Chris Johnson
Good assessment/understanding of the issue. git clean -n does not report anything as being targeted for removal, and git clean -f matches that behavior. I agree with it probably being related specifically to the -d flag. As another experiment I modified .gitignore to ignore /A/B/C instead of

Re: Bug Report: .gitignore behavior is not matching in git clean and git status

2017-04-30 Thread Junio C Hamano
Chris Johnson writes: > I am a mailing list noob so I’m sorry if this is the wrong format or > the wrong please. > > Here’s the setup for the bug (I will call it a bug but I half expect > somebody to tell me I’m an idiot): > > git init > echo "/A/B/" > .gitignore You

Bug Report: .gitignore behavior is not matching in git clean and git status

2017-04-28 Thread Chris Johnson
I am a mailing list noob so I’m sorry if this is the wrong format or the wrong please. Here’s the setup for the bug (I will call it a bug but I half expect somebody to tell me I’m an idiot): git init echo "/A/B/" > .gitignore git add .gitignore && git commit -m 'Add ignore' mkdir -p A/B touch