diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-08-30 17:06:26 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-08-30 17:06:26 -0400 |
| commit | 4a0dbeb0d35343ded24b51906f2a8f8ef6c7910b (patch) | |
| tree | 2ccbd7c102ff4e4aa2b0b63469a77832b0e276dd /src/merge.c | |
| parent | 3273ab3f0b04d673b9515b149674d5716939d9a5 (diff) | |
| download | libgit2-4a0dbeb0d35343ded24b51906f2a8f8ef6c7910b.tar.gz | |
diff: use new iterator pathlist handling
When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`
turn on the faster iterator pathlist handling.
Updates iterator pathspecs to include directory prefixes (eg, `foo/`)
for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
Diffstat (limited to 'src/merge.c')
| -rw-r--r-- | src/merge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/merge.c b/src/merge.c index 1460a5040..5ba263bb4 100644 --- a/src/merge.c +++ b/src/merge.c @@ -2357,7 +2357,8 @@ static int merge_check_index(size_t *conflicts, git_repository *repo, git_index } iter_opts.flags = GIT_ITERATOR_DONT_IGNORE_CASE; - iter_opts.pathlist = &staged_paths; + iter_opts.pathlist.strings = (char **)staged_paths.contents; + iter_opts.pathlist.count = staged_paths.length; 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 || |
