This patch series addresses several bugs and performance issues in .gitignore 
processing that came up in the inotify discussion.

Also available here:
git pull git:// kb/improve-git-status-ignored

Patches 1 - 4 fix bugs in 'git-status --ignored' and add appropriate test cases.

Patches 5 - 7 eliminate the is_path_excluded API, in favor of a slightly 
improved and faster is_excluded. This speeds up 'git-ls-files --cached 
--ignored' by factor 5 - 6.

Patch 8 finally skips excluded checks for tracked files. With the bugs and 
is_path_excluded out of the way, it should be obvious that this can safely be 
done unconditionally without introducing regressions. Speeds up 'git-status 
[--ignored]' by factor 1.4 - 2.

I still believe that 'git-status --ignored' shouldn't list "ignored tracked" 
directories, to be consistent with the listing of untracked directories, and 
because "ignored tracked" contradicts the very definition of ignored content in 


Karsten Blees (8):
  dir.c: git-status --ignored: don't drop ignored directories
  dir.c: git-status --ignored: don't list files in ignored directories
  dir.c: git-status --ignored: don't list empty ignored directories
  dir.c: git-status --ignored: don't list empty directories as ignored
  dir.c: move prep_exclude and factor out parts of last_exclude_matching
  dir.c: unify is_excluded and is_path_excluded APIs
  dir.c: replace is_path_excluded with now equivalent is_excluded API
  dir.c: git-status: avoid is_excluded checks for tracked files

 builtin/add.c              |   5 +-
 builtin/check-ignore.c     |   6 +-
 builtin/ls-files.c         |  15 +-
 dir.c                      | 351 +++++++++++++++++----------------------------
 dir.h                      |  22 +--
 t/ | 104 +++++++++++++-
 unpack-trees.c             |  10 +-
 unpack-trees.h             |   1 -
 8 files changed, 243 insertions(+), 271 deletions(-)

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to