Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/wt-status.c b/wt-status.c
index 62fadc0c93..867e3e417e 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -616,7 +616,7 @@ static void wt_status_collect_changes_worktree(struct wt_status *s)
rev.diffopt.rename_score = s->rename_score >= 0 ? s->rename_score : rev.diffopt.rename_score;
copy_pathspec(&rev.prune_data, &s->pathspec);
run_diff_files(&rev, 0);
- clear_pathspec(&rev.prune_data);
+ release_revisions(&rev);
}
static void wt_status_collect_changes_index(struct wt_status *s)
@@ -662,8 +662,7 @@ static void wt_status_collect_changes_index(struct wt_status *s)
copy_pathspec(&rev.prune_data, &s->pathspec);
run_diff_index(&rev, 1);
- object_array_clear(&rev.pending);
- clear_pathspec(&rev.prune_data);
+ release_revisions(&rev);
}
static int add_file_to_list(const struct object_id *oid,
@@ -1152,6 +1151,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
rev.diffopt.b_prefix = "w/";
run_diff_files(&rev, 0);
}
+ release_revisions(&rev);
}
static void wt_longstatus_print_tracking(struct wt_status *s)
@@ -2545,7 +2545,9 @@ int has_unstaged_changes(struct repository *r, int ignore_submodules)
rev_info.diffopt.flags.quick = 1;
diff_setup_done(&rev_info.diffopt);
result = run_diff_files(&rev_info, 0);
- return diff_result_code(&rev_info.diffopt, result);
+ result = diff_result_code(&rev_info.diffopt, result);
+ release_revisions(&rev_info);
+ return result;
}
/**
@@ -2577,8 +2579,9 @@ int has_uncommitted_changes(struct repository *r,
diff_setup_done(&rev_info.diffopt);
result = run_diff_index(&rev_info, 1);
- object_array_clear(&rev_info.pending);
- return diff_result_code(&rev_info.diffopt, result);
+ result = diff_result_code(&rev_info.diffopt, result);
+ release_revisions(&rev_info);
+ return result;
}
/**