git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jean-Noël AVILA" <jn.avila@free.fr>
To: git@vger.kernel.org,
	Julia Evans via GitGitGadget <gitgitgadget@gmail.com>
Cc: Julia Evans <julia@jvns.ca>
Subject: Re: [PATCH 1/5] doc: git-add: remove options from SYNOPSIS
Date: Wed, 13 Aug 2025 22:47:36 +0200	[thread overview]
Message-ID: <2319022.iZASKD2KPV@cayenne> (raw)
In-Reply-To: <3a2cc38b72fb0f6ccc0ec9cbefadb7576cd8b934.1755029249.git.gitgitgadget@gmail.com>

On Tuesday, 12 August 2025 22:07:25 CEST Julia Evans via GitGitGadget wrote:
> From: Julia Evans <julia@jvns.ca>
> 
> Motivations for this change:
> 
> 1. Listing a huge number of options is visually overwhelming when
>    opening a man page for an unfamiliar command. It makes it harder
>    to understand the command's core syntax, like `git add <filename>`
> 2. For options which can be passed independently of any other options,
>    including them in the SYNOPSIS does not add any information which you
>    can't already get from reading the OPTIONS section. `git add` has
>    some mutually exclusive options, namely:
>    [--[no-]all | -A | --[no-]ignore-removal | [--update | -u]]
>    but personally I already find that line so hard to parse that
>    removing it doesn't remove a lot of information
> 3. Some man pages already take this approach, like `git rebase` and
>    `git status`
> 
> Signed-off-by: Julia Evans <julia@jvns.ca>
> ---
>  Documentation/git-add.adoc | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/Documentation/git-add.adoc b/Documentation/git-add.adoc
> index b7a735824d6c..12afeead6637 100644
> --- a/Documentation/git-add.adoc
> +++ b/Documentation/git-add.adoc
> @@ -8,11 +8,7 @@ git-add - Add file contents to the index
>  SYNOPSIS
>  --------
>  [synopsis]
> -git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -
i]
> [--patch | -p] -	[--edit | -e] [--[no-]all | -A | --[no-]ignore-removal |
> [--update | -u]] [--sparse] -	[--intent-to-add | -N] [--refresh] [--
ignore-errors]
> [--ignore-missing] [--renormalize] -	[--chmod=(+|-)x] [--pathspec-from-
file=<file>
> [--pathspec-file-nul]]
> -	[--] [<pathspec>...]
> +git add [<options>] [--] [<pathspec>...]
> 
>  DESCRIPTION
>  -----------


Hello,

I'm not crazy about this change. In its new form, it is almost useless and 
formally wrong: according to it, `git add` is a valid invocation. The question 
is about how this synopsis section is supposed to be used. For me, this is a 
quick refresher of the available options, their exact name and how they can be 
combined, a kind of compact overview.

I'm not saying that the current form is good. For instance, I would expect to 
see alternative forms such as `git add -u` appear on their own line whereas 
other forms require <pathspec>. There are common options that could be hidden 
into the [<options>] stuff, even if it kills a bit the "compact summary" 
feature of the synopsis, but as you said, these are independent and can be 
found under the 'OPTIONS' section.

The design of the man pages predates some more modern approaches to organizing 
technical documentation e.g. https://diataxis.fr/ and https://help.adobe.com/
en_US/framemaker/2019/using/using-framemaker-2019/user-guide/
frm_structauthdita_sd_dita-topics.html. Thus they are mixing different aims/
approaches in a single document. Anyway, we can agree to classify some of the 
manual page sections into the more modern typing. For instance, I think 
SYNOPSIS falls under the "reference" type, and as such should be as 
comprehensive as possible.

Jean-Noël




  parent reply	other threads:[~2025-08-13 20:47 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12 20:07 [PATCH 0/5] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-12 20:07 ` [PATCH 1/5] doc: git-add: remove options from SYNOPSIS Julia Evans via GitGitGadget
2025-08-12 20:41   ` Junio C Hamano
2025-08-13 16:58     ` Julia Evans
2025-08-13 20:47   ` Jean-Noël AVILA [this message]
2025-08-12 20:07 ` [PATCH 2/5] doc: git-add: start man page with an example Julia Evans via GitGitGadget
2025-08-12 21:01   ` Junio C Hamano
2025-08-12 21:40     ` Julia Evans
2025-08-12 22:12       ` Junio C Hamano
2025-08-12 22:45         ` Julia Evans
2025-08-13 17:22       ` D. Ben Knoble
2025-08-14  0:41       ` Junio C Hamano
2025-08-14  2:59         ` Julia Evans
2025-08-15  5:38           ` Junio C Hamano
2025-08-12 20:07 ` [PATCH 3/5] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-13 17:24   ` D. Ben Knoble
2025-08-12 20:07 ` [PATCH 4/5] doc: git-add: make explanation less dry Julia Evans via GitGitGadget
2025-08-12 20:07 ` [PATCH 5/5] doc: git-add: explain inconsistent terminology Julia Evans via GitGitGadget
2025-08-12 20:51   ` Chris Torek
2025-08-12 21:36     ` Junio C Hamano
2025-08-12 21:43       ` Julia Evans
2025-08-13 23:20 ` [PATCH v2 0/4] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-13 23:20   ` [PATCH v2 1/4] doc: git-add: start man page with an example Julia Evans via GitGitGadget
2025-08-15  0:38     ` Junio C Hamano
2025-08-15 13:34       ` Jean-Noël AVILA
2025-08-15 16:33         ` Junio C Hamano
2025-08-17 18:37           ` Jean-Noël AVILA
2025-08-19 20:01             ` Julia Evans
2025-08-13 23:20   ` [PATCH v2 2/4] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-14  0:59     ` D. Ben Knoble
2025-08-14 22:10     ` Junio C Hamano
2025-08-13 23:20   ` [PATCH v2 3/4] doc: git-add: make explanation less dry Julia Evans via GitGitGadget
2025-08-14 22:22     ` Junio C Hamano
2025-08-15 16:10       ` Julia Evans
2025-08-15 18:25         ` D. Ben Knoble
2025-08-15 20:01           ` Junio C Hamano
2025-08-16 14:15             ` D. Ben Knoble
2025-08-15 19:47         ` Junio C Hamano
2025-08-19 12:57           ` Julia Evans
2025-08-21 20:36             ` Jean-Noël AVILA
2025-08-13 23:20   ` [PATCH v2 4/4] doc: git-add: explain inconsistent terminology Julia Evans via GitGitGadget
2025-08-14 22:49     ` Junio C Hamano
2025-08-19 20:09       ` Julia Evans
2025-08-19 20:46   ` [PATCH v3 0/3] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-19 20:46     ` [PATCH v3 1/3] Git 2.51 Junio C Hamano via GitGitGadget
2025-08-19 21:06       ` rsbecker
2025-08-19 21:37         ` Junio C Hamano
2025-08-19 21:44           ` D. Ben Knoble
2025-08-19 21:48             ` Julia Evans
2025-08-19 21:49           ` rsbecker
2025-08-19 20:46     ` [PATCH v3 2/3] doc: git-add: clarify intro & add an example Julia Evans via GitGitGadget
2025-08-21 20:08       ` Junio C Hamano
2025-08-22 20:37         ` Julia Evans
2025-08-19 20:46     ` [PATCH v3 3/3] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-21 20:09       ` Junio C Hamano
2025-08-29 11:55     ` [PATCH v4 0/2] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-29 11:55       ` [PATCH v4 1/2] doc: git-add: clarify intro & add an example Julia Evans via GitGitGadget
2025-08-29 11:55       ` [PATCH v4 2/2] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-29 17:11       ` [PATCH v4 0/2] doc: git-add: clarify DESCRIPTION section Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2319022.iZASKD2KPV@cayenne \
    --to=jn.avila@free.fr \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=julia@jvns.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).