summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-04-13 20:01:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-04-14 06:56:09 (GMT)
commit689a8e80dd4f7b3a20be88146bdea833c7759603 (patch)
tree3b59de124fe5c41ba3e9e78415b60c66d1b0a61c /wt-status.c
parentf41fb662f57abccf24d036bb0fd4294eb72261af (diff)
downloadgit-689a8e80dd4f7b3a20be88146bdea833c7759603.zip
git-689a8e80dd4f7b3a20be88146bdea833c7759603.tar.gz
git-689a8e80dd4f7b3a20be88146bdea833c7759603.tar.bz2
revisions API: have release_revisions() release "prune_data"
Extend the the release_revisions() function so that it frees the "prune_data" in the "struct rev_info". This means that any code that calls "release_revisions()" already can get rid of adjacent calls to clear_pathspec(). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/wt-status.c b/wt-status.c
index a14fad1..61e0c10 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -616,7 +616,6 @@ 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);
}
@@ -664,7 +663,6 @@ static void wt_status_collect_changes_index(struct wt_status *s)
copy_pathspec(&rev.prune_data, &s->pathspec);
run_diff_index(&rev, 1);
release_revisions(&rev);
- clear_pathspec(&rev.prune_data);
}
static int add_file_to_list(const struct object_id *oid,