зеркало из https://github.com/microsoft/git.git
[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:
Родитель
6c56c5340a
Коммит
c4ee2952b3
|
@ -136,7 +136,10 @@ static void read_directory(const char *path, const char *base, int baselen)
|
|||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче