summaryrefslogtreecommitdiffstats
path: root/rerere.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-08-13 18:14:22 +0200
committerJunio C Hamano <gitster@pobox.com>2018-08-13 14:14:42 -0700
commit6d2df284e7f4d7cd9f46992282ef59a72a9db527 (patch)
treee574b2e2c62144926ced7a251f82260a61211d16 /rerere.c
parent7f944e264ebe2fcf9a2c228a9fc9463ab3274d39 (diff)
downloadgit-6d2df284e7f4d7cd9f46992282ef59a72a9db527.tar.gz
git-6d2df284e7f4d7cd9f46992282ef59a72a9db527.tar.xz
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 'rerere.c')
-rw-r--r--rerere.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rerere.c b/rerere.c
index 16c8aac62..c7787aa07 100644
--- a/rerere.c
+++ b/rerere.c
@@ -1120,7 +1120,7 @@ int rerere_forget(struct pathspec *pathspec)
find_conflict(&conflict);
for (i = 0; i < conflict.nr; i++) {
struct string_list_item *it = &conflict.items[i];
- if (!match_pathspec(pathspec, it->string,
+ if (!match_pathspec(&the_index, pathspec, it->string,
strlen(it->string), 0, NULL, 0))
continue;
rerere_forget_one_path(it->string, &merge_rr);