projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
diff-tree -c: show a merge commit a bit more sensibly.
[git.git]
/
ls-files.c
diff --git
a/ls-files.c
b/ls-files.c
index
cc5b32e
..
6af3b09
100644
(file)
--- a/
ls-files.c
+++ b/
ls-files.c
@@
-209,7
+209,7
@@
static int excluded(const char *pathname)
struct nond_on_fs {
int len;
struct nond_on_fs {
int len;
- char name[
0];
+ char name[
FLEX_ARRAY]; /* more */
};
static struct nond_on_fs **dir;
};
static struct nond_on_fs **dir;
@@
-293,11
+293,12
@@
static void read_directory(const char *path, const char *base, int baselen)
/* fallthrough */
case DT_DIR:
memcpy(fullname + baselen + len, "/", 2);
/* fallthrough */
case DT_DIR:
memcpy(fullname + baselen + len, "/", 2);
+ len++;
if (show_other_directories &&
if (show_other_directories &&
- !dir_exists(fullname, baselen + len
+ 1
))
+ !dir_exists(fullname, baselen + len))
break;
read_directory(fullname, fullname,
break;
read_directory(fullname, fullname,
- baselen + len
+ 1
);
+ baselen + len);
continue;
case DT_REG:
case DT_LNK:
continue;
case DT_REG:
case DT_LNK: