From: "Jean-Noël AVILA" <jn.avila@free.fr>
To: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>,
git@vger.kernel.org,
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>
Subject: Re: [PATCH 4/4] doc: convert git-show to synopsis style
Date: Sun, 25 Jan 2026 22:11:37 +0100 [thread overview]
Message-ID: <3926333.kQq0lBPeGt@piment-oiseau> (raw)
In-Reply-To: <51016c02-40de-431f-a4ba-e08cb1bb8235@app.fastmail.com>
On Sunday, 25 January 2026 20:27:38 CET Kristoffer Haugsbakk wrote:
> On Fri, Jan 23, 2026, at 22:15, Jean-Noël Avila via GitGitGadget wrote:
> > From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
> >
> > * add synopsis block definition in asciidoc.conf.in
>
> This is for e.g. ``<hash> <title-line>`` it looks like. Is the intent to
> use italics on placeholders like `<hash>`?
Yes, it is. It turns out that asciidoc.py treats differently, paragraph styles
and block styles. Until now, we only used paragraph style for synopsis.
> > For plain blobs, it shows the plain contents.
> >
> > -Some options that 'git log' command understands can be used to
> > +Some options that `git log` command understands can be used to
>
> Same here.
>
> It could be nice to s/`git log` command/linkgit:git-log[1]/ either on
> this commit or in a separate one.
The problem is that pretty-formats.adoc is also included in git-log.adoc and I
don't think it makes sense to self-cross-reference. If we want to generalize,
it would need some conditional inclusion/replacement.
> >>
> > built-in formats:
> > -* `oneline`
> > -
> > - <hash> <title-line>
> > +`oneline`::
> > ++
> > +[synopsis]
> > +--
> > +`<hash> <title-line>`
> > +--
>
> HTML looks wrong in git-show(1) and others that include it. Something
> like this:
>
> oneline
> __<hash>__ __<title-line>__
>
The first edit was `<hash> <title-line>` but the rendering odd with the
following items which where more spaced. So, I changed to synopsis block but
forgot the back-ticks.
Will reroll.
> This doesn’t happen when I run asciidoc(1) or asciidoctor(1) directly.
>
<snip>
>
> (For these pretty formats) The diff got confused I think but the
> conversion looks correct.
>
It looks better but not perfect. It is difficult to render correctly when the
usual grammatical signs are in fact keywords. See below for better
explanation.
> > +
> > This format is used to refer to another commit in a commit message and
> > is the same as ++--pretty=\'format:%C(auto)%h (%s, %ad)'++. By default,
>
> Not changed in this patch but this doesn’t render correctly for me. It’s
> not inline verbatim/code all the way through. But it is correct if I
> remove the `\`.
>
> I don’t know why `++` was used either.
That's where the synopsis style fails. If we use backticks for this span, the
parenthesis are interpreted as grammar signs, whereas here, we intend to pass
the whole span as verbatim.
For asciidoc.py, using the verbatim form '++' ensures that the whole span is
treated as such. On my computer (asciidoc.py version 10.2.1), this renders as
correctly.
For asciidoctor unfortunately, the synopsis processing is performed very late
in the generation, after all parsing has been done. So, the '++' verbatim is
processed the same way as backticked contents. I haven't found a better
alternative. The output is this wrongly processed span here.
This is the least breaking way I found. It means that for asciidoc.py, we can
bypass the synopsis style with '++' formatting.
If I remove the backslash in this, the span inside the single quotes is
converted to italics by both engines.
Can you describe your setup?
>
> This looks correct just looking quickly over.
>
> > -** `prefix=<value>`: Shown before the list of ref names. Defaults to
> > "{nbsp}++(++".
>
> All of these use the "(" style which doesn’t look good in my
> opinion. But I’m guessing it has to do with some of them using spaces in
> them and `"` being used as a boundary.
Same here as above. I get the correct rendering for asciidoc.py. For
asciidoctor, this is rendered as normal text. Not correct but not completely
bogus.
> >
> > -++%(describe++`[:<option>,...]`++)++::
>
> > +++%(`describe++``[:<option>,...]`++)++::
> This renders with backticks in HTML:
>
> %(describe++`[:<option>,...]`)++
>
Ah, thanks for spotting. I mixed again synopsis and plain verbatim.
Will reroll.
> >
> > the literal formatting codes described above. To use comma as
> > separator one must use `%x2C` as it would otherwise be parsed as
> > next option. E.g., +%(trailers:key=Ticket,separator=%x2C )+
> > shows all trailer lines whose key is "Ticket" separated by a comma
>
> Might as well s/"Ticket"/`Ticket`/ ?
Difficult to say. This is not a keyword per se. Changing is ok for me.
> The rest looks okay.
next prev parent reply other threads:[~2026-01-25 21:11 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 21:14 [PATCH 0/4] doc: some more synopsis conversions and fixes Jean-Noël Avila via GitGitGadget
2026-01-23 21:15 ` [PATCH 1/4] convert git-submodule doc to synopsis style Jean-Noël Avila via GitGitGadget
2026-02-01 12:04 ` Kristoffer Haugsbakk
2026-01-23 21:15 ` [PATCH 2/4] doc: finalize git-clone documentation conversion " Jean-Noël Avila via GitGitGadget
2026-02-01 12:04 ` Kristoffer Haugsbakk
2026-02-01 13:14 ` Jean-Noël AVILA
2026-02-02 8:36 ` Kristoffer Haugsbakk
2026-01-23 21:15 ` [PATCH 3/4] doc: fix some style issues in git-clone and for-each-ref-options Jean-Noël Avila via GitGitGadget
2026-02-01 12:11 ` Kristoffer Haugsbakk
2026-01-23 21:15 ` [PATCH 4/4] doc: convert git-show to synopsis style Jean-Noël Avila via GitGitGadget
2026-01-25 19:27 ` Kristoffer Haugsbakk
2026-01-25 21:11 ` Jean-Noël AVILA [this message]
2026-01-26 5:58 ` Kristoffer Haugsbakk
2026-01-26 21:25 ` [PATCH v2 0/4] doc: some more synopsis conversions and fixes Jean-Noël Avila via GitGitGadget
2026-01-26 21:25 ` [PATCH v2 1/4] convert git-submodule doc to synopsis style Jean-Noël Avila via GitGitGadget
2026-01-26 21:25 ` [PATCH v2 2/4] doc: finalize git-clone documentation conversion " Jean-Noël Avila via GitGitGadget
2026-01-26 21:25 ` [PATCH v2 3/4] doc: fix some style issues in git-clone and for-each-ref-options Jean-Noël Avila via GitGitGadget
2026-01-26 21:25 ` [PATCH v2 4/4] doc: convert git-show to synopsis style Jean-Noël Avila via GitGitGadget
2026-02-01 12:12 ` Kristoffer Haugsbakk
2026-02-01 16:39 ` Jean-Noël AVILA
2026-02-03 17:03 ` [PATCH v3 0/4] doc: some more synopsis conversions and fixes Jean-Noël Avila via GitGitGadget
2026-02-03 17:03 ` [PATCH v3 1/4] doc: convert git-submodule to synopsis style Jean-Noël Avila via GitGitGadget
2026-02-03 21:45 ` Kristoffer Haugsbakk
2026-02-06 3:55 ` Jean-Noël Avila
2026-02-03 17:03 ` [PATCH v3 2/4] doc: finalize git-clone documentation conversion " Jean-Noël Avila via GitGitGadget
2026-02-03 21:45 ` Kristoffer Haugsbakk
2026-02-03 17:03 ` [PATCH v3 3/4] doc: fix some style issues in git-clone and for-each-ref-options Jean-Noël Avila via GitGitGadget
2026-02-03 21:46 ` Kristoffer Haugsbakk
2026-02-03 17:03 ` [PATCH v3 4/4] doc: convert git-show to synopsis style Jean-Noël Avila via GitGitGadget
2026-02-03 21:44 ` Kristoffer Haugsbakk
2026-02-03 21:44 ` [PATCH v3 0/4] doc: some more synopsis conversions and fixes Kristoffer Haugsbakk
2026-02-04 16:24 ` Kristoffer Haugsbakk
2026-02-06 4:12 ` [PATCH v4 " Jean-Noël Avila via GitGitGadget
2026-02-06 4:12 ` [PATCH v4 1/4] doc: convert git-submodule to synopsis style Jean-Noël Avila via GitGitGadget
2026-02-06 4:12 ` [PATCH v4 2/4] doc: finalize git-clone documentation conversion " Jean-Noël Avila via GitGitGadget
2026-02-06 4:12 ` [PATCH v4 3/4] doc: fix some style issues in git-clone and for-each-ref-options Jean-Noël Avila via GitGitGadget
2026-02-06 4:12 ` [PATCH v4 4/4] doc: convert git-show to synopsis style Jean-Noël Avila via GitGitGadget
2026-02-07 14:24 ` [PATCH v4 0/4] doc: some more synopsis conversions and fixes Kristoffer Haugsbakk
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=3926333.kQq0lBPeGt@piment-oiseau \
--to=jn.avila@free.fr \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=kristofferhaugsbakk@fastmail.com \
/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