{"thread":{"id":"65307","subject":"[PATCH] use strvec_pushv() to add another strvec","startedAt":"2026-03-19T20:49:07Z","lastAt":"2026-03-27T23:07:40Z","messageCount":6,"participants":["René Scharfe","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"539421","messageId":"ad46f86f-2ac0-4802-8e63-d854d594932d@web.de","threadId":"65307","inReplyTo":null,"subject":"[PATCH] use strvec_pushv() to add another strvec","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2026-03-19T20:49:05Z","receivedAt":"2026-03-19T20:49:07Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":null},"body":"Simplify the code by letting strvec_pushv() add the items of a second\nstrvec instead of pushing them one by one.\n\nSigned-off-by: René Scharfe <l.s.r@web.de>\n---\n fetch-pack.c | 8 ++------\n git.c        | 3 +--\n submodule.c  | 4 +---\n 3 files changed, 4 insertions(+), 11 deletions(-)\n\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex 6ecd468ef7..a32224ed02 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -1024,12 +1024,8 @@ static int get_pack(struct fetch_pack_args *args,\n \t\t\t\t     fsck_msg_types.buf);\n \t}\n \n-\tif (index_pack_args) {\n-\t\tint i;\n-\n-\t\tfor (i = 0; i < cmd.args.nr; i++)\n-\t\t\tstrvec_push(index_pack_args, cmd.args.v[i]);\n-\t}\n+\tif (index_pack_args)\n+\t\tstrvec_pushv(index_pack_args, cmd.args.v);\n \n \tsigchain_push(SIGPIPE, SIG_IGN);\n \ndiff --git a/git.c b/git.c\nindex 2b212e6675..5a40eab8a2 100644\n--- a/git.c\n+++ b/git.c\n@@ -877,8 +877,7 @@ static int run_argv(struct strvec *args)\n \t\t\tcommit_pager_choice();\n \n \t\t\tstrvec_push(&cmd.args, \"git\");\n-\t\t\tfor (size_t i = 0; i < args->nr; i++)\n-\t\t\t\tstrvec_push(&cmd.args, args->v[i]);\n+\t\t\tstrvec_pushv(&cmd.args, args->v);\n \n \t\t\ttrace_argv_printf(cmd.args.v, \"trace: exec:\");\n \ndiff --git a/submodule.c b/submodule.c\nindex cd879a5cfe..4c8c674aa4 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -1815,7 +1815,6 @@ int fetch_submodules(struct repository *r,\n \t\t     int default_option,\n \t\t     int quiet, int max_parallel_jobs)\n {\n-\tint i;\n \tstruct submodule_parallel_fetch spf = SPF_INIT;\n \tconst struct run_process_parallel_opts opts = {\n \t\t.tr2_category = \"submodule\",\n@@ -1842,8 +1841,7 @@ int fetch_submodules(struct repository *r,\n \t\tdie(_(\"index file corrupt\"));\n \n \tstrvec_push(&spf.args, \"fetch\");\n-\tfor (i = 0; i < options->nr; i++)\n-\t\tstrvec_push(&spf.args, options->v[i]);\n+\tstrvec_pushv(&spf.args, options->v);\n \tstrvec_push(&spf.args, \"--recurse-submodules-default\");\n \t/* default value, \"--submodule-prefix\" and its value are added later */\n \n-- \n2.53.0\n"},{"id":"539423","messageId":"xmqqwlz7iks3.fsf@gitster.g","threadId":"65307","inReplyTo":"ad46f86f-2ac0-4802-8e63-d854d594932d@web.de","subject":"Re: [PATCH] use strvec_pushv() to add another strvec","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-19T21:14:52Z","receivedAt":"2026-03-19T21:14:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":null},"body":"René Scharfe <l.s.r@web.de> writes:\n\n> Simplify the code by letting strvec_pushv() add the items of a second\n> strvec instead of pushing them one by one.\n>\n> Signed-off-by: René Scharfe <l.s.r@web.de>\n> ---\n>  fetch-pack.c | 8 ++------\n>  git.c        | 3 +--\n>  submodule.c  | 4 +---\n>  3 files changed, 4 insertions(+), 11 deletions(-)\n\nNice.  Is this something we can make a coccinelle rule for?\n\nSomething like\n\n@@\nstruct strvec SRC;\nstruct strvec DST;\nsize_t I;\n@@\n-\tfor (size_t I = 0; I < SRC.nr; I++)\n-\t\tstrvec_push(&DST, SRC.v[I]);\n+\tstrvec_pushv(&DST, SRC.v);\n\nperhaps?\n\nWill queue.\n\n> diff --git a/fetch-pack.c b/fetch-pack.c\n> index 6ecd468ef7..a32224ed02 100644\n> --- a/fetch-pack.c\n> +++ b/fetch-pack.c\n> @@ -1024,12 +1024,8 @@ static int get_pack(struct fetch_pack_args *args,\n>  \t\t\t\t     fsck_msg_types.buf);\n>  \t}\n>  \n> -\tif (index_pack_args) {\n> -\t\tint i;\n> -\n> -\t\tfor (i = 0; i < cmd.args.nr; i++)\n> -\t\t\tstrvec_push(index_pack_args, cmd.args.v[i]);\n> -\t}\n> +\tif (index_pack_args)\n> +\t\tstrvec_pushv(index_pack_args, cmd.args.v);\n>  \n>  \tsigchain_push(SIGPIPE, SIG_IGN);\n>  \n> diff --git a/git.c b/git.c\n> index 2b212e6675..5a40eab8a2 100644\n> --- a/git.c\n> +++ b/git.c\n> @@ -877,8 +877,7 @@ static int run_argv(struct strvec *args)\n>  \t\t\tcommit_pager_choice();\n>  \n>  \t\t\tstrvec_push(&cmd.args, \"git\");\n> -\t\t\tfor (size_t i = 0; i < args->nr; i++)\n> -\t\t\t\tstrvec_push(&cmd.args, args->v[i]);\n> +\t\t\tstrvec_pushv(&cmd.args, args->v);\n>  \n>  \t\t\ttrace_argv_printf(cmd.args.v, \"trace: exec:\");\n>  \n> diff --git a/submodule.c b/submodule.c\n> index cd879a5cfe..4c8c674aa4 100644\n> --- a/submodule.c\n> +++ b/submodule.c\n> @@ -1815,7 +1815,6 @@ int fetch_submodules(struct repository *r,\n>  \t\t     int default_option,\n>  \t\t     int quiet, int max_parallel_jobs)\n>  {\n> -\tint i;\n>  \tstruct submodule_parallel_fetch spf = SPF_INIT;\n>  \tconst struct run_process_parallel_opts opts = {\n>  \t\t.tr2_category = \"submodule\",\n> @@ -1842,8 +1841,7 @@ int fetch_submodules(struct repository *r,\n>  \t\tdie(_(\"index file corrupt\"));\n>  \n>  \tstrvec_push(&spf.args, \"fetch\");\n> -\tfor (i = 0; i < options->nr; i++)\n> -\t\tstrvec_push(&spf.args, options->v[i]);\n> +\tstrvec_pushv(&spf.args, options->v);\n>  \tstrvec_push(&spf.args, \"--recurse-submodules-default\");\n>  \t/* default value, \"--submodule-prefix\" and its value are added later */\n"},{"id":"539457","messageId":"6c16da38-654d-4959-b0d9-3fff3d96d036@web.de","threadId":"65307","inReplyTo":"xmqqwlz7iks3.fsf@gitster.g","subject":"Re: [PATCH] use strvec_pushv() to add another strvec","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2026-03-20T00:46:21Z","receivedAt":"2026-03-20T00:46:32Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":null},"body":"On 3/19/26 10:14 PM, Junio C Hamano wrote:\n> René Scharfe <l.s.r@web.de> writes:\n> \n>> Simplify the code by letting strvec_pushv() add the items of a second\n>> strvec instead of pushing them one by one.\n>>\n>> Signed-off-by: René Scharfe <l.s.r@web.de>\n>> ---\n>>  fetch-pack.c | 8 ++------\n>>  git.c        | 3 +--\n>>  submodule.c  | 4 +---\n>>  3 files changed, 4 insertions(+), 11 deletions(-)\n> \n> Nice.  Is this something we can make a coccinelle rule for?\n> \n> Something like\n> \n> @@\n> struct strvec SRC;\n> struct strvec DST;\n> size_t I;\n> @@\n> -\tfor (size_t I = 0; I < SRC.nr; I++)\n> -\t\tstrvec_push(&DST, SRC.v[I]);\n> +\tstrvec_pushv(&DST, SRC.v);\n> \n> perhaps?\nWe can.  Should we?  It does find a fourth case from the 18th batch that\nhas landed a few hours ago, at least.  Will send as v2.\n\nRené\n\n"},{"id":"539458","messageId":"084f3b43-91ac-4553-8305-03944e97eaa6@web.de","threadId":"65307","inReplyTo":"ad46f86f-2ac0-4802-8e63-d854d594932d@web.de","subject":"[PATCH v2] use strvec_pushv() to add another strvec","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2026-03-20T00:46:26Z","receivedAt":"2026-03-20T00:46:33Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":null},"body":"Add and apply a semantic patch that simplifies the code by letting\nstrvec_pushv() append the items of a second strvec instead of pushing\nthem one by one.\n\nSuggested-by: Junio C Hamano <gitster@pobox.com>\nSigned-off-by: René Scharfe <l.s.r@web.de>\n---\nChanges since v1:\n- Semantic patch.\n- New conversion in builtin/rebase.c.\n\n builtin/rebase.c                |  3 +--\n contrib/coccinelle/strvec.cocci | 46 +++++++++++++++++++++++++++++++++\n fetch-pack.c                    |  8 ++----\n git.c                           |  3 +--\n submodule.c                     |  4 +--\n 5 files changed, 51 insertions(+), 13 deletions(-)\n create mode 100644 contrib/coccinelle/strvec.cocci\n\ndiff --git a/builtin/rebase.c b/builtin/rebase.c\nindex a1c7d78196..fa4f5d9306 100644\n--- a/builtin/rebase.c\n+++ b/builtin/rebase.c\n@@ -182,8 +182,7 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)\n \n \treplay.signoff = opts->signoff;\n \n-\tfor (size_t i = 0; i < opts->trailer_args.nr; i++)\n-\t\tstrvec_push(&replay.trailer_args, opts->trailer_args.v[i]);\n+\tstrvec_pushv(&replay.trailer_args, opts->trailer_args.v);\n \n \treplay.allow_ff = !(opts->flags & REBASE_FORCE);\n \tif (opts->allow_rerere_autoupdate)\ndiff --git a/contrib/coccinelle/strvec.cocci b/contrib/coccinelle/strvec.cocci\nnew file mode 100644\nindex 0000000000..64edb09f1c\n--- /dev/null\n+++ b/contrib/coccinelle/strvec.cocci\n@@ -0,0 +1,46 @@\n+@@\n+type T;\n+identifier i;\n+expression dst;\n+struct strvec *src_ptr;\n+struct strvec src_arr;\n+@@\n+(\n+- for (T i = 0; i < src_ptr->nr; i++) { strvec_push(dst, src_ptr->v[i]); }\n++ strvec_pushv(dst, src_ptr->v);\n+|\n+- for (T i = 0; i < src_arr.nr; i++) { strvec_push(dst, src_arr.v[i]); }\n++ strvec_pushv(dst, src_arr.v);\n+)\n+\n+@ separate_loop_index @\n+type T;\n+identifier i;\n+expression dst;\n+struct strvec *src_ptr;\n+struct strvec src_arr;\n+@@\n+  T i;\n+  ...\n+(\n+- for (i = 0; i < src_ptr->nr; i++) { strvec_push(dst, src_ptr->v[i]); }\n++ strvec_pushv(dst, src_ptr->v);\n+|\n+- for (i = 0; i < src_arr.nr; i++) { strvec_push(dst, src_arr.v[i]); }\n++ strvec_pushv(dst, src_arr.v);\n+)\n+\n+@ unused_loop_index extends separate_loop_index @\n+@@\n+  {\n+  ...\n+- T i;\n+  ... when != i\n+  }\n+\n+@ depends on unused_loop_index @\n+@@\n+  if (...)\n+- {\n+  strvec_pushv(...);\n+- }\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex 6ecd468ef7..a32224ed02 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -1024,12 +1024,8 @@ static int get_pack(struct fetch_pack_args *args,\n \t\t\t\t     fsck_msg_types.buf);\n \t}\n \n-\tif (index_pack_args) {\n-\t\tint i;\n-\n-\t\tfor (i = 0; i < cmd.args.nr; i++)\n-\t\t\tstrvec_push(index_pack_args, cmd.args.v[i]);\n-\t}\n+\tif (index_pack_args)\n+\t\tstrvec_pushv(index_pack_args, cmd.args.v);\n \n \tsigchain_push(SIGPIPE, SIG_IGN);\n \ndiff --git a/git.c b/git.c\nindex 2b212e6675..5a40eab8a2 100644\n--- a/git.c\n+++ b/git.c\n@@ -877,8 +877,7 @@ static int run_argv(struct strvec *args)\n \t\t\tcommit_pager_choice();\n \n \t\t\tstrvec_push(&cmd.args, \"git\");\n-\t\t\tfor (size_t i = 0; i < args->nr; i++)\n-\t\t\t\tstrvec_push(&cmd.args, args->v[i]);\n+\t\t\tstrvec_pushv(&cmd.args, args->v);\n \n \t\t\ttrace_argv_printf(cmd.args.v, \"trace: exec:\");\n \ndiff --git a/submodule.c b/submodule.c\nindex cd879a5cfe..4c8c674aa4 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -1815,7 +1815,6 @@ int fetch_submodules(struct repository *r,\n \t\t     int default_option,\n \t\t     int quiet, int max_parallel_jobs)\n {\n-\tint i;\n \tstruct submodule_parallel_fetch spf = SPF_INIT;\n \tconst struct run_process_parallel_opts opts = {\n \t\t.tr2_category = \"submodule\",\n@@ -1842,8 +1841,7 @@ int fetch_submodules(struct repository *r,\n \t\tdie(_(\"index file corrupt\"));\n \n \tstrvec_push(&spf.args, \"fetch\");\n-\tfor (i = 0; i < options->nr; i++)\n-\t\tstrvec_push(&spf.args, options->v[i]);\n+\tstrvec_pushv(&spf.args, options->v);\n \tstrvec_push(&spf.args, \"--recurse-submodules-default\");\n \t/* default value, \"--submodule-prefix\" and its value are added later */\n \n-- \n2.53.0\n"},{"id":"539659","messageId":"xmqqeclb91v6.fsf@gitster.g","threadId":"65307","inReplyTo":"084f3b43-91ac-4553-8305-03944e97eaa6@web.de","subject":"Re: [PATCH v2] use strvec_pushv() to add another strvec","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-22T18:05:01Z","receivedAt":"2026-03-22T18:05:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":null},"body":"René Scharfe <l.s.r@web.de> writes:\n\n> Add and apply a semantic patch that simplifies the code by letting\n> strvec_pushv() append the items of a second strvec instead of pushing\n> them one by one.\n>\n> Suggested-by: Junio C Hamano <gitster@pobox.com>\n> Signed-off-by: René Scharfe <l.s.r@web.de>\n> ---\n> Changes since v1:\n> - Semantic patch.\n> - New conversion in builtin/rebase.c.\n\nThanks.  The fixup does not apply to plain vanilla v2.53 but that is\nOK, as a code-cleanup patch like this is not maint material.\n\n> diff --git a/contrib/coccinelle/strvec.cocci b/contrib/coccinelle/strvec.cocci\n> new file mode 100644\n> index 0000000000..64edb09f1c\n> --- /dev/null\n> +++ b/contrib/coccinelle/strvec.cocci\n> @@ -0,0 +1,46 @@\n> +@@\n> +type T;\n> +identifier i;\n> +expression dst;\n> +struct strvec *src_ptr;\n> +struct strvec src_arr;\n> +@@\n> +(\n> +- for (T i = 0; i < src_ptr->nr; i++) { strvec_push(dst, src_ptr->v[i]); }\n> ++ strvec_pushv(dst, src_ptr->v);\n> +|\n> +- for (T i = 0; i < src_arr.nr; i++) { strvec_push(dst, src_arr.v[i]); }\n> ++ strvec_pushv(dst, src_arr.v);\n> +)\n> +\n> +@ separate_loop_index @\n> +type T;\n> +identifier i;\n> +expression dst;\n> +struct strvec *src_ptr;\n> +struct strvec src_arr;\n> +@@\n> +  T i;\n> +  ...\n> +(\n> +- for (i = 0; i < src_ptr->nr; i++) { strvec_push(dst, src_ptr->v[i]); }\n> ++ strvec_pushv(dst, src_ptr->v);\n> +|\n> +- for (i = 0; i < src_arr.nr; i++) { strvec_push(dst, src_arr.v[i]); }\n> ++ strvec_pushv(dst, src_arr.v);\n> +)\n\nIt is a bit unfortunate that we need to write these four cases separately.\n\n> +@ unused_loop_index extends separate_loop_index @\n> +@@\n> +  {\n> +  ...\n> +- T i;\n> +  ... when != i\n> +  }\n\nI do not grok this one (not an objection, but a statement of fact\nthat I have to look up what \"when !=\" is doing there and I haven't).\n\n> +@ depends on unused_loop_index @\n> +@@\n> +  if (...)\n> +- {\n> +  strvec_pushv(...);\n> +- }\n\nThis is a bit questionable, in that we would probably want to remove\nexcess {} around any simple single-statement block, and not limited\nto a call to strvec_pushv().\n\nI think it leads to a philosophical question: should Coccinelle\nrules used in the context of this project aim to produce the ideal\nresult that does not require any human clean-up, or is it OK to make\nhumans notice there is a questionable construction without updating\nit to the final ideal form?  I've been assuming the latter somehow\nbut I do not recall we had a discussion or decision on this point.\n\n> diff --git a/fetch-pack.c b/fetch-pack.c\n> index 6ecd468ef7..a32224ed02 100644\n> --- a/fetch-pack.c\n> +++ b/fetch-pack.c\n> @@ -1024,12 +1024,8 @@ static int get_pack(struct fetch_pack_args *args,\n>  \t\t\t\t     fsck_msg_types.buf);\n>  \t}\n>  \n> -\tif (index_pack_args) {\n> -\t\tint i;\n> -\n> -\t\tfor (i = 0; i < cmd.args.nr; i++)\n> -\t\t\tstrvec_push(index_pack_args, cmd.args.v[i]);\n> -\t}\n> +\tif (index_pack_args)\n> +\t\tstrvec_pushv(index_pack_args, cmd.args.v);\n\nThis does lead to a great result, and I presume that this is the\ndoing of the last two rules?\n"},{"id":"540245","messageId":"b1a9ce9e-fe3f-4f1d-a603-7f484f1ba834@web.de","threadId":"65307","inReplyTo":"xmqqeclb91v6.fsf@gitster.g","subject":"Re: [PATCH v2] use strvec_pushv() to add another strvec","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2026-03-27T23:07:38Z","receivedAt":"2026-03-27T23:07:40Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":null},"body":"On 3/22/26 7:05 PM, Junio C Hamano wrote:\n> René Scharfe <l.s.r@web.de> writes:\n> \n>> diff --git a/contrib/coccinelle/strvec.cocci b/contrib/coccinelle/strvec.cocci\n>> new file mode 100644\n>> index 0000000000..64edb09f1c\n>> --- /dev/null\n>> +++ b/contrib/coccinelle/strvec.cocci\n>> @@ -0,0 +1,46 @@\n>> +@@\n>> +type T;\n>> +identifier i;\n>> +expression dst;\n>> +struct strvec *src_ptr;\n>> +struct strvec src_arr;\n>> +@@\n>> +(\n>> +- for (T i = 0; i < src_ptr->nr; i++) { strvec_push(dst, src_ptr->v[i]); }\n>> ++ strvec_pushv(dst, src_ptr->v);\n>> +|\n>> +- for (T i = 0; i < src_arr.nr; i++) { strvec_push(dst, src_arr.v[i]); }\n>> ++ strvec_pushv(dst, src_arr.v);\n>> +)\n>> +\n>> +@ separate_loop_index @\n>> +type T;\n>> +identifier i;\n>> +expression dst;\n>> +struct strvec *src_ptr;\n>> +struct strvec src_arr;\n>> +@@\n>> +  T i;\n>> +  ...\n>> +(\n>> +- for (i = 0; i < src_ptr->nr; i++) { strvec_push(dst, src_ptr->v[i]); }\n>> ++ strvec_pushv(dst, src_ptr->v);\n>> +|\n>> +- for (i = 0; i < src_arr.nr; i++) { strvec_push(dst, src_arr.v[i]); }\n>> ++ strvec_pushv(dst, src_arr.v);\n>> +)\n> \n> It is a bit unfortunate that we need to write these four cases separately.\n\nAn abstraction that matches both struct and struct pointer as well as\nthe appropriate member access operator would be nice.\n\n\"_arr\" is a misnomer.  struct strvec is not an array, even though it\ncontains one and its purpose is to store multiple items.\n\n>> +@ unused_loop_index extends separate_loop_index @\n>> +@@\n>> +  {\n>> +  ...\n>> +- T i;\n>> +  ... when != i\n>> +  }\n> \n> I do not grok this one (not an objection, but a statement of fact\n> that I have to look up what \"when !=\" is doing there and I haven't).\n\nThis line matches code that doesn't contain i, which is loop counter\nfrom the rule above.\n\n>> +@ depends on unused_loop_index @\n>> +@@\n>> +  if (...)\n>> +- {\n>> +  strvec_pushv(...);\n>> +- }\n> \n> This is a bit questionable, in that we would probably want to remove\n> excess {} around any simple single-statement block, and not limited\n> to a call to strvec_pushv().\n\nPerhaps, but this rule only exists to mop up after the one it depends\non, which can create such a thing.\n\nEven if we had a general rule for that (and I'm not sure if that would\nbe a good idea), it would probably live in a different file.  And\nwithout this one here we'd need to run coccicheck and apply its results\ntwice -- first for strvec_pushv(), then again for brace removal.\nUnnecessarily annoying.\n\n> I think it leads to a philosophical question: should Coccinelle\n> rules used in the context of this project aim to produce the ideal\n> result that does not require any human clean-up, or is it OK to make\n> humans notice there is a questionable construction without updating\n> it to the final ideal form?  I've been assuming the latter somehow\n> but I do not recall we had a discussion or decision on this point\n\nThe README doesn't say, but mentions \"cost-benefit ratio\" twice.\n\nWithout brace-removal I get (with \"make clean\" between runs): \n\nBenchmark 1: make tools/coccinelle/strvec.cocci.patch\n  Time (mean ± σ):     18.864 s ±  0.084 s    [User: 51.865 s, System: 17.521 s]\n  Range (min … max):   18.677 s … 18.974 s    10 runs\n\n... and with it:\n\nBenchmark 1: make tools/coccinelle/strvec.cocci.patch\n  Time (mean ± σ):     19.066 s ±  0.132 s    [User: 52.462 s, System: 17.665 s]\n  Range (min … max):   18.956 s … 19.300 s    10 runs\n\nI think a more interesting question is whether we want to keep the\noverall rule.  If we do then automatic brace-removal doesn't add\ntoo much a cost on top.\n\n>> diff --git a/fetch-pack.c b/fetch-pack.c\n>> index 6ecd468ef7..a32224ed02 100644\n>> --- a/fetch-pack.c\n>> +++ b/fetch-pack.c\n>> @@ -1024,12 +1024,8 @@ static int get_pack(struct fetch_pack_args *args,\n>>  \t\t\t\t     fsck_msg_types.buf);\n>>  \t}\n>>  \n>> -\tif (index_pack_args) {\n>> -\t\tint i;\n>> -\n>> -\t\tfor (i = 0; i < cmd.args.nr; i++)\n>> -\t\t\tstrvec_push(index_pack_args, cmd.args.v[i]);\n>> -\t}\n>> +\tif (index_pack_args)\n>> +\t\tstrvec_pushv(index_pack_args, cmd.args.v);\n> \n> This does lead to a great result, and I presume that this is the\n> doing of the last two rules?\n\nRight, and the one above them, of course.\n\nRené\n\n"}]}