From: Linus Torvalds Date: Thu, 12 Apr 2007 21:32:21 +0000 (-0700) Subject: Don't show gitlink directories when we want "other" files X-Git-Tag: v1.5.2-rc0~19^2~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab22aed3b7517c6390cb622b368bfcf503b7a37a;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/dir.c b/dir.c index 7b9150125..6564a929f 100644 --- a/dir.c +++ b/dir.c @@ -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: