aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-09-19 18:49:07 -0400
committerJunio C Hamano <gitster@pobox.com>2025-09-22 14:27:03 -0700
commitb553332f82440d68710fcfd2dd6718ec5b43f841 (patch)
treed146355a3b1bba9ec00af8a5d1102cec57f77ead /builtin
parentf93c1d86ccadd9c08969c5fd7c4906da74cd84e4 (diff)
downloadgit-b553332f82440d68710fcfd2dd6718ec5b43f841.tar.xz
treewide: use setup_revisions_from_strvec() when we have a strvec
The previous commit introduced a wrapper to make using setup_revisions() with a strvec easier and safer. It converted spots that were already doing most of what the wrapper did. Let's now convert spots where we were not setting up the free_removed_argv_elements flag. As discussed in the previous commit, this probably isn't fixing any bugs or leaks (since these sites wouldn't trigger the re-shuffling of argv that causes them). This is mostly future-proofing us against setup_revisions() becoming more aggressive about its re-shuffling. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/describe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index d7dd8139de..c8b3081a4d 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -525,7 +525,8 @@ static void describe_blob(struct object_id oid, struct strbuf *dst)
NULL);
repo_init_revisions(the_repository, &revs, NULL);
- if (setup_revisions(args.nr, args.v, &revs, NULL) > 1)
+ setup_revisions_from_strvec(&args, &revs, NULL);
+ if (args.nr > 1)
BUG("setup_revisions could not handle all args?");
if (prepare_revision_walk(&revs))