Re: [PATCH v1 1/3] transport-helper: do not run git-remote-ext etc. in dashed form
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 26, 2020, 16:27 UTC
- Message-ID
- <xmqqpn7dwews.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAPig+cTvLaOD1idfB2M0-QSfXXKBe5-FnWSU9E0PaUMHAoGj1w@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 5 quoted lines
> On Tue, Aug 25, 2020 at 9:17 PM Junio C Hamano <gitster@pobox.com> wrote: >> Runing them as "git remote-ext" and letting "git" dispatch to > > s/Runing/Running/ > s/them/it/
I wrote 'them' because it is not only 'ext' but other helpers are also run with the same mechanism, but the sentence uses remote-ext as a single concrete example, so 'it' would be more appropriate. Thanks.
Show 13 quoted lines
>> "remote-ext" would just be fine and is more idiomatic. >> >> Signed-off-by: Junio C Hamano <gitster@pobox.com> >> --- >> diff --git a/transport-helper.c b/transport-helper.c >> @@ -128,7 +128,8 @@ static struct child_process *get_helper(struct transport *transport) >> - strvec_pushf(&helper->args, "git-remote-%s", data->name); >> + strvec_push(&helper->args, "git"); >> + strvec_pushf(&helper->args, "remote-%s", data->name); > > Rather than pushing "git" as the first argument, would it instead be > more idiomatic to set `helper->git_cmd = 1` (or would that not work > correctly for some reason)?
I was aiming for minimum change and did not think too deeply.
If .git_cmd=1 works here (and offhand I do not see a reason why not), then that would be simpler. Thanks.