summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 657907e)
raw | patch | inline | side by side (parent: 657907e)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 7 Jan 2006 22:31:56 +0000 (14:31 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 8 Jan 2006 05:34:02 +0000 (21:34 -0800) |
This adds a trailing slash to directory names in the output
when "--others --directory" option shows only untracked
directories and not their contents, to make them stand out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
when "--others --directory" option shows only untracked
directories and not their contents, to make them stand out.
Signed-off-by: Junio C Hamano <junkio@cox.net>
ls-files.c | patch | blob | history |
diff --git a/ls-files.c b/ls-files.c
index cc5b32e8bac12105873ecee73a9fc9036d71b61b..b29fe1be7e9f48bafafd2bd197c7238ee251b2cd 100644 (file)
--- a/ls-files.c
+++ b/ls-files.c
/* fallthrough */
case DT_DIR:
memcpy(fullname + baselen + len, "/", 2);
+ len++;
if (show_other_directories &&
- !dir_exists(fullname, baselen + len + 1))
+ !dir_exists(fullname, baselen + len))
break;
read_directory(fullname, fullname,
- baselen + len + 1);
+ baselen + len);
continue;
case DT_REG:
case DT_LNK: