diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2007-04-12 14:32:21 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-12 16:23:25 -0700 |
commit | ab22aed3b7517c6390cb622b368bfcf503b7a37a (patch) | |
tree | b9072c35c96cd6546a221ff1239b1eb9d7fc7500 | |
parent | e011054b0fdcd1e29d85cdde7ffa5d5c125bd753 (diff) | |
download | git-ab22aed3b7517c6390cb622b368bfcf503b7a37a.tar.gz git-ab22aed3b7517c6390cb622b368bfcf503b7a37a.tar.xz |
Don't show gitlink directories when we want "other" files
When "show_other_directories" is set, that implies that we are looking
for untracked files, which obviously means that we should ignore
directories that are marked as gitlinks in the index.
This fixes "git status" in a superproject, that would otherwise always
report that subprojects were "Untracked files:"
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -375,6 +375,8 @@ static enum directory_treatment treat_directory(struct dir_struct *dir, return recurse_into_directory; case index_gitdir: + if (dir->show_other_directories) + return ignore_directory; return show_directory; case index_nonexistent: |