diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-05-29 12:34:41 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-05-29 12:34:41 +0900 |
| commit | 4eeed27e16c71ceecdf5a2d51af4099bb12ff775 (patch) | |
| tree | 771f960fbcb7b98880e2625080b115ffe34f9b67 /builtin/add.c | |
| parent | Merge branch 'sb/checkout-recurse-submodules' (diff) | |
| parent | dir: convert fill_directory to take an index (diff) | |
| download | git-4eeed27e16c71ceecdf5a2d51af4099bb12ff775.tar.gz git-4eeed27e16c71ceecdf5a2d51af4099bb12ff775.zip | |
Merge branch 'bw/dir-c-stops-relying-on-the-index'
API update.
* bw/dir-c-stops-relying-on-the-index:
dir: convert fill_directory to take an index
dir: convert read_directory to take an index
dir: convert read_directory_recursive to take an index
dir: convert open_cached_dir to take an index
dir: convert is_excluded to take an index
dir: convert prep_exclude to take an index
dir: convert add_excludes to take an index
dir: convert is_excluded_from_list to take an index
dir: convert last_exclude_matching_from_list to take an index
dir: convert dir_add* to take an index
dir: convert get_dtype to take index
dir: convert directory_exists_in_index to take index
dir: convert read_skip_worktree_file_from_index to take an index
dir: stop using the index compatibility macros
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 9f53f020d0..36cad00ae6 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -400,7 +400,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); } @@ -436,8 +436,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); |
