diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-03-24 12:26:58 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-24 12:26:58 -0700 |
| commit | 250e977a2b0aa8cc1c8063c64c44597a166e79f5 (patch) | |
| tree | 4bd35c77429ddd78fd53233d41e44b92e02d3e15 /git.c | |
| parent | 2d733b9660700fa4dd03a89d9003b8865b99bf4d (diff) | |
| download | git-250e977a2b0aa8cc1c8063c64c44597a166e79f5.tar.xz | |
use strvec_pushv() to add another strvec
Add and apply a semantic patch that simplifies the code by letting
strvec_pushv() append the items of a second strvec instead of pushing
them one by one.
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
| -rw-r--r-- | git.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -877,8 +877,7 @@ static int run_argv(struct strvec *args) commit_pager_choice(); strvec_push(&cmd.args, "git"); - for (size_t i = 0; i < args->nr; i++) - strvec_push(&cmd.args, args->v[i]); + strvec_pushv(&cmd.args, args->v); trace_argv_printf(cmd.args.v, "trace: exec:"); |
