Subject: Re: [PATCH v2 1/5] doc: git-diff: apply new documentation guidelines

From: Junio C Hamano <[email-masked]>
Date: Tue, 12 Nov 2024 18:13:20 +0900

Jean-Noël Avila <[email-masked]> writes:

> With the new document processor extension, the back tick quotes have
> become smarter and they behave basically like an inline synopsis
> section. Here, this means that the line will be formatted roughly as
> follows:
>
> `git diff` [_<options>_] [`--`] [_<path>_...]

Ahh, yes, it is the key magic how your "enclosing the whole line"
works.  It's been so long since we adopted the topic that laid the
groundwork that I forgot ;-)

Again, it is very pleasant for us writers to be able to just do so.

>>> +`-1` `--base`::
>>> +`-2` `--ours`::
>>> +`-3` `--theirs`::
>> 
>> Why aren't these `-1 --base` and instead mark up individual tokens?
>> 
>
> Here, it is quite awkward, because we are mixing alternate spellings of
> the same option (`-1` and `--base` have the same meaning) with the fact
> that these options are meant to be alternatives. The latter meaning is
> not what is usually conveyed in the lists of options, which blurs the
> following explanation.
>
> To clarify, from what I understand, it would be better to fully spell
> out the way these options are used by using the synopsis syntax:
>
> `(-1|--base) | (-2|--ours) | (-3|--theirs)`::
>
> Is it how it works?

Yeah, that may be a more sensible rewrite (regardless of this
"better mark-up" topic).

Thanks.