Re: [PATCH v2 0/9] Keep git clean -d from inadvertently removing ignored files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 9, 2017, 00:31 UTC
- Message-ID
- <xmqqh90u7two.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAJZjrdVTRdTOiHXdVzVY3CLoi7KMbGozg8rDvrmJOJADMXRFuw@mail.gmail.com>
Samuel Lijin <sxlijin@gmail.com> writes:
Show 11 quoted lines
> What happens right now is that because (1) directories containing only > untracked and ignored files are considered "untracked" and (2) > read_directory_recursive() skips over untracked directories, even with > DIR_SHOW_IGNORED_TOO set. As a result, `status --ignored` never lists > ignored files if they're in an "untracked" directory (and this is the > currently defined behavior per t7061). > > By teaching read_directory_recursive() to recurse into untracked > directories in search of ignored files when DIR_SHOW_IGNORED_TOO is > set, though, `status --ignored` now learns to report the existence of > these ignored files, whereas previously it did not.
OK, if you are revisiting the design decision made by eb8c5b87 ("git-status: Test --ignored behavior", 2012-12-30), we should clearly document it in the log message of the commit that does so in a way similar to how eb8c5b87 described the behaviour it desired.
Thanks.