diff options
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/wt-status.c b/wt-status.c index d33f927..867e3e4 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, @@ -982,7 +981,7 @@ static void wt_longstatus_print_submodule_summary(struct wt_status *s, int uncom struct strbuf summary = STRBUF_INIT; char *summary_content; - strvec_pushf(&sm_summary.env_array, "GIT_INDEX_FILE=%s", s->index_file); + strvec_pushf(&sm_summary.env, "GIT_INDEX_FILE=%s", s->index_file); strvec_push(&sm_summary.args, "submodule"); strvec_push(&sm_summary.args, "summary"); @@ -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; } /** |