diff options
Diffstat (limited to 'builtin/add.c')
| -rw-r--r-- | builtin/add.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/add.c b/builtin/add.c index 0365a52098..d9a2491e48 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -404,7 +404,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) } /* This picks up the paths that are not tracked */ - baselen = fill_directory(&dir, &pathspec); + baselen = fill_directory(&dir, &the_index, &pathspec); if (pathspec.nr) seen = prune_directory(&dir, &pathspec, baselen); } @@ -440,8 +440,9 @@ int cmd_add(int argc, const char **argv, const char *prefix) !file_exists(path))) { if (ignore_missing) { int dtype = DT_UNKNOWN; - if (is_excluded(&dir, path, &dtype)) - dir_add_ignored(&dir, path, pathspec.items[i].len); + if (is_excluded(&dir, &the_index, path, &dtype)) + dir_add_ignored(&dir, &the_index, + path, pathspec.items[i].len); } else die(_("pathspec '%s' did not match any files"), pathspec.items[i].original); |
