git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-pack: use internal argv_array of struct child_process

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 22, 2017, 20:11 UTC
Message-ID
<xmqqpo76r09w.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kb43_nSm-tjv3zOw7OFzByM3WocYboB6QRr=Z7bRue_hA@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 8 quoted lines
>> +       argv_array_push(&po.args, "pack-objects");
>> +       argv_array_push(&po.args, "--all-progress-implied");
>> +       argv_array_push(&po.args, "--revs");
>> +       argv_array_push(&po.args, "--stdout");
>
> (useless nit of the day, no need to resend:)
> These four statements could be done as pushl(a,b,c, NULL);
> but it would not differ in readability, so I guess either is fine.

Yup. Shorter is not necessarily better. If we anticipate that we will need to update the set of options later (and I suspect we may be doing so soon, given what JeffH and JTan are working on recently), one option (or option-argument pair) per line is a more preferrable form from the maintenance point of view.

Previous: Stefan Beller
Message 3 of 3 in “send-pack: use internal argv_array of struct child_process”
  1. send-pack: use internal argv_array of struct child_processRené Scharfe, Dec 22, 2017
  2. Stefan BellerDec 22, 2017
  3. Junio C HamanoDec 22, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.