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

Re: [PATCH] parse-options: print "fatal:" before usage_msg_opt()

From
Jeff King <peff@peff.net>
Date
Dec 19, 2016, 13:41 UTC
Message-ID
<20161219134148.vxa4fz3jw2i23lfm@sigill.intra.peff.net>
In-Reply-To
<20161219120719.GF24125@ash>
On Mon, Dec 19, 2016 at 07:07:19PM +0700, Duy Nguyen wrote:
Show 18 quoted lines
> On Wed, Dec 14, 2016 at 10:10:10AM -0500, Jeff King wrote:
> > diff --git a/parse-options.c b/parse-options.c
> > index 312a85dbd..4fbe924a5 100644
> > --- a/parse-options.c
> > +++ b/parse-options.c
> > @@ -661,7 +661,7 @@ void NORETURN usage_msg_opt(const char *msg,
> >  		   const char * const *usagestr,
> >  		   const struct option *options)
> >  {
> > -	fprintf(stderr, "%s\n\n", msg);
> > +	fprintf(stderr, "fatal: %s\n\n", msg);
> 
> Your commit message does not make clear if you want this "fatal" to be
> grep-able (by scripts) or not. If not, please _() the string.  Maybe
> this to reduce work for translators
> 
> 	/* TRANSLATORS: this is the prefix before usage error */
> 	fprintf(stderr, "%s %s\n\n", _("fatal:"), msg);

I don't think we translate any of our "fatal:", "error:", etc, do we? It certainly doesn't look like it in usage.c.

-Peff
Previous: Duy NguyenNext: Duy Nguyen
Message 4 of 8 in “parse-options: print "fatal:" before usage_msg_opt()”
  1. parse-options: print "fatal:" before usage_msg_opt()Jeff King, Dec 14, 2016
  2. Junio C HamanoDec 14, 2016
  3. Duy NguyenDec 19, 2016
  4. Jeff KingDec 19, 2016
  5. Duy NguyenDec 19, 2016
  6. Jeff KingDec 19, 2016
  7. Duy NguyenDec 19, 2016
  8. Jeff KingDec 19, 2016

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.