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

Re: [PATCH 3/7] add description parameter to OPT__QUIET

From
Jeff King <peff@peff.net>
Date
Nov 8, 2010, 18:18 UTC
Message-ID
<20101108181801.GB30428@sigill.intra.peff.net>
In-Reply-To
<4CD83ABD.30804@lsrfire.ath.cx>
On Mon, Nov 08, 2010 at 07:00:29PM +0100, René Scharfe wrote:
> Allows better help text to be defined than "be quiet".  Also make use
> of the macro in a place that already had a different description.  No
> object code changes intended.

Maybe my "don't repeat yourself" spider sense is over-reacting, but of 12 callsites, 11 of them will continue to use "be quiet". Maybe instead of:

> -#define OPT__QUIET(var)    OPT_BOOLEAN('q', "quiet",   (var), "be quiet")
> +#define OPT__QUIET(var, h)    OPT_BOOLEAN('q', "quiet",   (var), (h))
we could have:
  #define OPT__QUIET_H(var, h) OPT_BOOLEAN('q', "quiet", (var), (h))
  #define OPT__QUIET(var) OPT__QUIET_H(var, "be quiet")
which would limit your patch to changing a single callsite.
-Peff
Previous: René ScharfeNext: Jonathan Nieder
Message 5 of 12 in “add description parameter to standard option macros”
  1. 0/7 add description parameter to standard option macrosRené Scharfe, Nov 8, 2010
  2. 2/7 add description parameter to OPT__DRY_RUNRené Scharfe, Nov 8, 2010
  3. 3/7 add description parameter to OPT__QUIETRené Scharfe, Nov 8, 2010
  4. René ScharfeNov 8, 2010
  5. Jeff KingNov 8, 2010
  6. Jonathan NiederNov 8, 2010
  7. Jeff KingNov 8, 2010
  8. René ScharfeNov 8, 2010
  9. 4/7 add OPT__FORCERené Scharfe, Nov 8, 2010
  10. 5/7 archive: improve --verbose descriptionRené Scharfe, Nov 8, 2010
  11. 6/7 branch: improve --verbose descriptionRené Scharfe, Nov 8, 2010
  12. 7/7 verify-tag: document --verboseRené Scharfe, Nov 8, 2010

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.