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

Re: [PATCH v2] Use proper syntax for replaceables in command docs

From
Junio C Hamano <gitster@pobox.com>
Date
May 25, 2018, 08:16 UTC
Message-ID
<xmqqlgc8noaj.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<alpine.LFD.2.21.1805241610030.7254@localhost.localdomain>
"Robert P. J. Day" <rpjday@crashcourse.ca> writes:
Show 26 quoted lines
> The standard for command documentation synopses appears to be:
>
>   [...] means optional
>   <...> means replaceable
>   [<...>] means both optional and replaceable
>
> So fix a number of doc pages that use incorrect variations of the
> above.
>
> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
>
> ---
>
> diff --git a/Documentation/git-annotate.txt b/Documentation/git-annotate.txt
> index 05fd482b7..e44a83133 100644
> --- a/Documentation/git-annotate.txt
> +++ b/Documentation/git-annotate.txt
> @@ -8,7 +8,7 @@ git-annotate - Annotate file lines with commit information
>  SYNOPSIS
>  --------
>  [verse]
> -'git annotate' [options] file [revision]
> +'git annotate' [<options>] <file> [<revision>]
> ...
> -'git check-mailmap' [options] <contact>...
> +'git check-mailmap' [<options>] <contact>...

A pedant in me screams s/<options>/<option>.../ after seeing this line, but <options> appears _very_ _very_ often and extremely handy, compared to having to spell "<option>...". So let's standardise the way this patch does.

Thanks.
Previous: Simon Ruderich
Message 3 of 3 in “Use proper syntax for replaceables in command docs”
  1. Use proper syntax for replaceables in command docsRobert P. J. Day, May 24, 2018
  2. Simon RuderichMay 25, 2018
  3. Junio C HamanoMay 25, 2018

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.