提交 c4ee2952 编写于 作者: J Junio C Hamano 提交者: Linus Torvalds

[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: NJunio C Hamano <junkio@cox.net>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6c56c534
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册