summaryrefslogtreecommitdiff
path: root/builtin/stash.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 /builtin/stash.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 'builtin/stash.c')
-rw-r--r--builtin/stash.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/builtin/stash.c b/builtin/stash.c
index 7c9c575..e6b4c12 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -1064,7 +1064,6 @@ static int check_changes_tracked_files(const struct pathspec *ps)
}
done:
- clear_pathspec(&rev.prune_data);
release_revisions(&rev);
return ret;
}
@@ -1276,7 +1275,6 @@ static int stash_working_tree(struct stash_info *info, const struct pathspec *ps
done:
discard_index(&istate);
- clear_pathspec(&rev.prune_data);
release_revisions(&rev);
strbuf_release(&diff_output);
remove_path(stash_index_path.buf);