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

Re: [PATCH 2/2] git: support separate arg for `--config-env`'s value

From
Jeff King <peff@peff.net>
Date
Apr 23, 2021, 10:07 UTC
Message-ID
<YIKcZxEDsG7qsE4G@coredump.intra.peff.net>
In-Reply-To
<874kg14490.fsf@evledraar.gmail.com>
On Tue, Apr 20, 2021 at 12:52:43PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> > Mitigate this inconsistency by accepting both syntaxes and add tests to
> > verify both work.
> >
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> 
> This whole series LGTM.
Me too. Thanks for finding it (and Patrick for fixing it).
Show 11 quoted lines
> > +		} else if (!strcmp(cmd, "--config-env")) {
> > +			if (*argc < 2) {
> > +				fprintf(stderr, _("no config key given for --config-env\n" ));
> 
> 
> I found this use of fprintf() slightly odd, why not error(), but then
> went back and read the function and saw that it has N number of
> "fprintf(stderr, [...])" already.
> 
> That could probably all be converted to error(), but better to be
> consistent for now.
Yep. Likewise the weird extra space at the end of the string.
-Peff
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 5 of 11 in “git: support separate arg for `--config-env`'s value”
  1. 0/2 git: support separate arg for `--config-env`'s valuePatrick Steinhardt, Apr 19, 2021
  2. 1/2 git.txt: fix synopsis of `--config-env` missing the equals signPatrick Steinhardt, Apr 19, 2021
  3. 2/2 git: support separate arg for `--config-env`'s valuePatrick Steinhardt, Apr 19, 2021
  4. Ævar Arnfjörð BjarmasonApr 20, 2021
  5. Jeff KingApr 23, 2021
  6. Ævar Arnfjörð BjarmasonApr 20, 2021
  7. 0/2 git: support separate arg for `--config-env`'s valuePatrick Steinhardt, Apr 29, 2021
  8. 1/2 git.txt: fix synopsis of `--config-env` missing the equals signPatrick Steinhardt, Apr 29, 2021
  9. 2/2 git: support separate arg for `--config-env`'s valuePatrick Steinhardt, Apr 29, 2021
  10. Jeff KingApr 29, 2021
  11. Junio C HamanoApr 30, 2021

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.