mojombo/grit — pull request #98 by blambeau (2011-10-15 06:51:57+00:00)
Title: StatusFile::ignored

Hi,

Here is a patch proposal to add StatusFile::ignored. The aim is to distinguish between untracked files that are ignored from those that are not.

Grit::Repo.status currently returns (mojombo/grit master branch as well as v2.4.1):
1) All tracked files, with flags according to their respective status 'M', 'A', 'D', etc.
2) All untracked files through a Dir.glob('**/*'), except directories and hidden files (e.g., .DS_Store). This means that ignored files are returned by status (e.g. pkg/grit-2.4.1.gem)

The proposed patch preserves this behavior for backward compatibility. In addition, it sets StatusFile::ignored to true for files ignored by git. The implementation relies on some hacks around 'git ls-files --others'.

What do you think? About the StatusFile::ignored proposal? The backward compatibility behavior? The implementation?

P.S. I've recreated this pull request from a specific ignored branch in my repo. Sorry for the inconvenience.

Thanks!