summaryrefslogtreecommitdiff
path: root/src/merge.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-07-28 19:55:37 -0500
committerEdward Thomson <ethomson@microsoft.com>2015-08-28 18:39:52 -0400
commitef206124de957408c8d867e2f923d0611a7274fc (patch)
treebc9a45937d109c6c7d3b1c2052a486d28b4ae470 /src/merge.c
parented1c64464a4e3126eef5d74d2c14c19133fa9cd8 (diff)
downloadlibgit2-ef206124de957408c8d867e2f923d0611a7274fc.tar.gz
Move filelist into the iterator handling itself.
Diffstat (limited to 'src/merge.c')
-rw-r--r--src/merge.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/merge.c b/src/merge.c
index 16cd2aee0..1460a5040 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -2356,10 +2356,8 @@ static int merge_check_index(size_t *conflicts, git_repository *repo, git_index
goto done;
}
- opts.pathspec.count = staged_paths.length;
- opts.pathspec.strings = (char **)staged_paths.contents;
-
iter_opts.flags = GIT_ITERATOR_DONT_IGNORE_CASE;
+ iter_opts.pathlist = &staged_paths;
if ((error = git_iterator_for_index(&iter_repo, index_repo, &iter_opts)) < 0 ||
(error = git_iterator_for_index(&iter_new, index_new, &iter_opts)) < 0 ||
@@ -2406,6 +2404,7 @@ static int merge_check_workdir(size_t *conflicts, git_repository *repo, git_inde
* will be applied by the merge (including conflicts). Ensure that there
* are no changes in the workdir to these paths.
*/
+ opts.flags |= GIT_DIFF_ENABLE_FILELIST_MATCH;
opts.pathspec.count = merged_paths->length;
opts.pathspec.strings = (char **)merged_paths->contents;