diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-07-14 12:35:55 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-15 21:56:08 +0400 |
commit | 7327d3d1b70bfde70840aa8970fe70de6ef1be16 (patch) | |
tree | 5740ac2d065dfc60e17f042959497dcf53af1e20 /builtin/add.c | |
parent | 9b2d61499b4ff9ded3e1f3d535912ce04c21d72e (diff) |
convert {read,fill}_directory to take struct pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/add.c')
-rw-r--r-- | builtin/add.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c index f5d6a33a6a..34c9358260 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -507,6 +507,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) if (add_new_files) { int baselen; + struct pathspec empty_pathspec; /* Set up the default git porcelain excludes */ memset(&dir, 0, sizeof(dir)); @@ -515,8 +516,9 @@ int cmd_add(int argc, const char **argv, const char *prefix) setup_standard_excludes(&dir); } + memset(&empty_pathspec, 0, sizeof(empty_pathspec)); /* This picks up the paths that are not tracked */ - baselen = fill_directory(&dir, implicit_dot ? NULL : pathspec.raw); + baselen = fill_directory(&dir, implicit_dot ? &empty_pathspec : &pathspec); if (pathspec.nr) seen = prune_directory(&dir, pathspec.raw, baselen, implicit_dot ? WARN_IMPLICIT_DOT : 0); |