aboutsummaryrefslogtreecommitdiffstats
path: root/http-push.c
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-21 13:47:08 -0700
commit7c416e4155bc3a3d4f0ec6643a3648bd9a278779 (patch)
treeeb064a8140340bbbbf278af8182abf81dfda3ffa /http-push.c
parentrevision: add wrapper to setup_revisions() from a strvec (diff)
downloadgit-7c416e4155bc3a3d4f0ec6643a3648bd9a278779.tar.gz
git-7c416e4155bc3a3d4f0ec6643a3648bd9a278779.zip
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 'http-push.c')
-rw-r--r--http-push.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/http-push.c b/http-push.c
index 91a5465afb..4c43ba3bc7 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1941,7 +1941,7 @@ int cmd_main(int argc, const char **argv)
strvec_pushf(&commit_argv, "^%s",
oid_to_hex(&ref->old_oid));
repo_init_revisions(the_repository, &revs, setup_git_directory());
- setup_revisions(commit_argv.nr, commit_argv.v, &revs, NULL);
+ setup_revisions_from_strvec(&commit_argv, &revs, NULL);
revs.edge_hint = 0; /* just in case */
/* Generate a list of objects that need to be pushed */