Skip to content

Commit c12bc32

Browse files
jacquesgThe rugged tests are fragile
authored andcommitted
Remove local unused index_repo variable
1 parent 9a8126e commit c12bc32

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/merge.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,6 @@ static int merge_check_index(size_t *conflicts, git_repository *repo, git_index
23422342

23432343
static int merge_check_workdir(size_t *conflicts, git_repository *repo, git_index *index_new, git_vector *merged_paths)
23442344
{
2345-
git_index *index_repo = NULL;
23462345
git_diff *wd_diff_list = NULL;
23472346
git_diff_options opts = GIT_DIFF_OPTIONS_INIT;
23482347
int error = 0;
@@ -2370,13 +2369,12 @@ static int merge_check_workdir(size_t *conflicts, git_repository *repo, git_inde
23702369
opts.pathspec.count = merged_paths->length;
23712370
opts.pathspec.strings = (char **)merged_paths->contents;
23722371

2373-
if ((error = git_diff_index_to_workdir(&wd_diff_list, repo, index_repo, &opts)) < 0)
2372+
if ((error = git_diff_index_to_workdir(&wd_diff_list, repo, NULL, &opts)) < 0)
23742373
goto done;
23752374

23762375
*conflicts = wd_diff_list->deltas.length;
23772376

23782377
done:
2379-
git_index_free(index_repo);
23802378
git_diff_free(wd_diff_list);
23812379

23822380
return error;

0 commit comments

Comments
 (0)