aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-24 12:26:58 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-24 12:26:58 -0700
commit250e977a2b0aa8cc1c8063c64c44597a166e79f5 (patch)
tree4bd35c77429ddd78fd53233d41e44b92e02d3e15 /builtin
parent2d733b9660700fa4dd03a89d9003b8865b99bf4d (diff)
downloadgit-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 'builtin')
-rw-r--r--builtin/rebase.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index a1c7d78196..fa4f5d9306 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -182,8 +182,7 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
replay.signoff = opts->signoff;
- for (size_t i = 0; i < opts->trailer_args.nr; i++)
- strvec_push(&replay.trailer_args, opts->trailer_args.v[i]);
+ strvec_pushv(&replay.trailer_args, opts->trailer_args.v);
replay.allow_ff = !(opts->flags & REBASE_FORCE);
if (opts->allow_rerere_autoupdate)