summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c56c53)
raw | patch | inline | side by side (parent: 6c56c53)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 25 May 2005 01:20:08 +0000 (18:20 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Wed, 25 May 2005 03:09:46 +0000 (20:09 -0700) |
This attempts to match "the directory '.git' anywhere in the
tree is ignored" approach taken in update-cache.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
tree is ignored" approach taken in update-cache.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ls-files.c | patch | blob | history |
diff --git a/ls-files.c b/ls-files.c
index 3b93d5e7cc7f7dd4ebed13a5cc1a4ad976fc94d8..03b218260e99b78c6df0ed378e59ed9205ccc96d 100644 (file)
--- a/ls-files.c
+++ b/ls-files.c
while ((de = readdir(dir)) != NULL) {
int len;
- if (de->d_name[0] == '.')
+ if ((de->d_name[0] == '.') &&
+ (de->d_name[1] == 0 ||
+ !strcmp(de->d_name + 1, ".") ||
+ !strcmp(de->d_name + 1, "git")))
continue;
if (excluded(de->d_name) != show_ignored)
continue;