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

Re: [PATCH] standardize usage info string format

From
SSScott Schmit <i.grok@comcast.net>
Date
Jan 13, 2015, 05:29 UTC
Message-ID
<20150113052901.GA10126@odin.ulthar.us>
In-Reply-To
<1420698501-15393-1-git-send-email-alexhenrie24@gmail.com>
On Wed, Jan 07, 2015 at 11:28:21PM -0700, Alex Henrie wrote:
Show 11 quoted lines
> This patch puts the usage info strings that were not already in docopt-
> like format into docopt-like format, which will be a litle easier for
> end users and a lot easier for translators. Changes include:
> 
> - Placing angle brackets around fill-in-the-blank parameters
> - Putting dashes in multiword parameter names
> - Adding spaces to [-f|--foobar] to make [-f | --foobar]
> - Replacing <foobar>* with [<foobar>...]
> 
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
Show 10 quoted lines
> diff --git a/builtin/diff-files.c b/builtin/diff-files.c
> index 9200069..1abeba6 100644
> --- a/builtin/diff-files.c
> +++ b/builtin/diff-files.c
> @@ -11,7 +11,7 @@
>  #include "submodule.h"
>  
>  static const char diff_files_usage[] =
> -"git diff-files [-q] [-0/-1/2/3 |-c|--cc] [<common diff options>] [<path>...]"
> +"git diff-files [-q] [-0/-1/2/3 | -c | --cc] [<common-diff-options>] [<path>...]"
                         ^^^^^^^^^
This deserves cleanup too (the man page shows it as "[-0|-1|-2|-3|-c|--cc]").
...which makes me think the man pages need to be modified to match.  

Also, it looks like items 1 & 4 are already codified in CodingGuidelines, but items 2 & 3 are new. If we care to make the changes in 2 & 3, we should document the new conventions there.

Bike-shedding, I'm sure: I find "[-0|-1|-2|-3|-c|--cc]" more readable/logical than "[-0 | -1 | -2 | -3 | -c | --cc]" (which I admit seems counter-intuitive), but I wouldn't be surprised if opinions on that are about as split as the existing usage lines are :-).

Hope this helps.
-- 
Scott Schmit
Previous: Matthieu Moy
Message 4 of 4 in “standardize usage info string format”
  1. standardize usage info string formatAlex Henrie, Jan 8, 2015
  2. Johannes SchindelinJan 8, 2015
  3. Matthieu MoyJan 8, 2015
  4. Scott SchmitJan 13, 2015

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.