diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-09-29 11:40:34 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-09-29 11:40:34 -0700 |
| commit | 4bac57bc67fbd3e319c2e70ffad63add6a273f6a (patch) | |
| tree | c30a5f28893af6f1e1e3114adb126160716ada18 /http-push.c | |
| parent | 84edf9956893195b260ca20bdca1cfe0dae6d859 (diff) | |
| parent | a04bc71725f27e6210602a981563511925f798b0 (diff) | |
Merge branch 'jk/setup-revisions-freefix'
There are double frees and leaks around setup_revisions() API used
in "git stash show", which has been fixed, and setup_revisions()
API gained a wrapper to make it more ergonomic when using it with
strvec-manged argc/argv pairs.
* jk/setup-revisions-freefix:
revision: retain argv NULL invariant in setup_revisions()
treewide: pass strvecs around for setup_revisions_from_strvec()
treewide: use setup_revisions_from_strvec() when we have a strvec
revision: add wrapper to setup_revisions() from a strvec
revision: manage memory ownership of argv in setup_revisions()
stash: tell setup_revisions() to free our allocated strings
Diffstat (limited to 'http-push.c')
| -rw-r--r-- | http-push.c | 2 |
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 */ |
