diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-08-13 18:14:22 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-08-13 14:14:42 -0700 |
| commit | 6d2df284e7f4d7cd9f46992282ef59a72a9db527 (patch) | |
| tree | e574b2e2c62144926ced7a251f82260a61211d16 /builtin/update-index.c | |
| parent | 7f944e264ebe2fcf9a2c228a9fc9463ab3274d39 (diff) | |
| download | git-6d2df284e7f4d7cd9f46992282ef59a72a9db527.tar.gz | |
dir.c: remove an implicit dependency on the_index in pathspec code
Make the match_patchspec API and friends take an index_state instead
of assuming the_index in dir.c. All external call sites are converted
blindly to keep the patch simple and retain current behavior.
Individual call sites may receive further updates to use the right
index instead of the_index.
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/update-index.c')
| -rw-r--r-- | builtin/update-index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c index f5c0b6a1d2..f75fd24083 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -748,7 +748,7 @@ static int do_reupdate(int ac, const char **av, int save_nr; char *path; - if (ce_stage(ce) || !ce_path_match(ce, &pathspec, NULL)) + if (ce_stage(ce) || !ce_path_match(&the_index, ce, &pathspec, NULL)) continue; if (has_head) old = read_one_ent(NULL, &head_oid, |
