mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
[PATCH] Allow dot files in ls-files as well (take #2).
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>
This commit is contained in:
parent
6c56c5340a
commit
c4ee2952b3
|
@ -136,7 +136,10 @@ static void read_directory(const char *path, const char *base, int baselen)
|
||||||
while ((de = readdir(dir)) != NULL) {
|
while ((de = readdir(dir)) != NULL) {
|
||||||
int len;
|
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;
|
continue;
|
||||||
if (excluded(de->d_name) != show_ignored)
|
if (excluded(de->d_name) != show_ignored)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue