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

Re: [PATCH 1/2] doc: add an option to have Asciidoctor build man pages directly

From
Jeff King <peff@peff.net>
Date
May 12, 2021, 06:59 UTC
Message-ID
<YJt81neO7zsGz2ah@coredump.intra.peff.net>
In-Reply-To
<YJt1/DO1cXNTRNxK@coredump.intra.peff.net>
On Wed, May 12, 2021 at 02:30:20AM -0400, Jeff King wrote:
Show 13 quoted lines
> On Wed, May 12, 2021 at 02:22:06AM -0400, Jeff King wrote:
> 
> > With that change, plus a patch I'll send in a minute, it's easy to run
> > doc-diff on the result.
> 
> And here that is (note that if you don't apply the flags fix I showed,
> then doc-diff gets confused, because it expects back-to-back runs of
> "make" to handle the changed flags correctly).
> 
> Feel free to add it to your series if it helps (I had originally thought
> it would just be a one-off to look at the output, but there are enough
> changes, both correctness and style, that it may be useful to have this
> option around).

Adding in the "\e" to the extensions string fixes many problems. Just skimming over the remaining changes (from asciidoctor+xmlto to asciidoctor direct), here are some things I see:

Both of the xmlto pipelines seem to insert extra space before a literal. The direct version fixes that. E.g.:

  -           Files to add content from. Fileglobs (e.g.  *.c) can be given to
  [...]
  +           Files to add content from. Fileglobs (e.g. *.c) can be given to add

So that's good. But what you can't see in the doc-diff rendered version is that we've lost the bolding on literals (this is from the <pathspec> option in git-add.1).

Another is that the direct version is less willing to break linkgit targets across lines:

  -           explained for the configuration variable core.quotePath (see git-
  -           config(1)). See also --pathspec-file-nul and global
  +           explained for the configuration variable core.quotePath (see
  +           git-config(1)). See also --pathspec-file-nul and global

That seems fine to me, though it unfortunately does make the diff quite noisy.

We seem to have a problem with some escape codes. E.g.:
  -           of nothing). The other file, git-add--interactive.perl, has 403
  -           lines added and 35 lines deleted if you commit what is in the
  -           index, but working tree file has further modifications (one
  +           of nothing). The other file, git-add&#x2d;&#x2d;interactive.perl,
  +           has 403 lines added and 35 lines deleted if you commit what is in
  +           the index, but working tree file has further modifications (one
and:
  -           Added content is represented by lines beginning with "+". You can
  -           prevent staging any addition lines by deleting them.
  +           Added content is represented by lines beginning with "&#43;". You
  +           can prevent staging any addition lines by deleting them.
which is a pretty bad regression.
The trailer misses the version field:
  -Git omitted                       1970-01-01                        GIT-ADD(1)
  +Git                               1970-01-01                        GIT-ADD(1)

The "omitted" is part of doc-diff's attempt to reduce noise in the diff. But you can see that it's missing entirely in the direct version.

There are lots of whitespace changes for lists. They mostly seem fine either way. It also formats numbered lists differently:

  -            1. Delete the remote-tracking branches "todo", "html" and
  +           (1) Delete the remote-tracking branches "todo", "html" and
                  "man". The next fetch or pull will create them again
                  unless you configure them not to. See git-fetch(1).
  -            2. Delete the "test" branch even if the "master" branch (or
  +           (2) Delete the "test" branch even if the "master" branch (or
                  whichever branch is currently checked out) does not have
                  all commits from the test branch.

I prefer the original, but could live with the latter (IIRC, this is something that can be configured via asciidoctor, but I didn't dig).

This one is quite curious (from gitworkflows(7)):
  -       Example 1. Merge upwards
  +       Rule: Merge upwards
The source looks like this:
  .Merge upwards
  [caption="Rule: "]

So it looks like it takes the caption, rather than the phrase "example" that I guess is coming from deep within the bowls of docbook. Both asciidoc and asciidoctor produce the "Example" text when going through xmlto, but both produce "Rule" when generating HTML. So I imagine the latter was the intent, and this is a fix.

Links are a bit harder to read. E.g.:
   SEE ALSO
          git-check-ref-format(1), git-fetch(1), git-remote(1), “Understanding
  -       history: What is a branch?”[1] in the Git User’s Manual.
  +       history: What is <user-manual.html#what-is-a-branch> a branch?”" in the
  +       Git User’s Manual.

There may be more lurking, but it's hard to tell given how noisy the diff is.

-Peff
Previous: Jeff KingNext: Felipe Contreras
Message 24 of 45 in “doc: use asciidoctor to build man pages directly”
  1. doc: use asciidoctor to build man pages directlyFelipe Contreras, May 11, 2021
  2. brian m. carlsonMay 11, 2021
  3. Felipe ContrerasMay 12, 2021
  4. 1/2 doc: add an option to have Asciidoctor build man pages directlybrian m. carlson, May 12, 2021
  5. 2/2 doc: remove GNU_ROFF optionbrian m. carlson, May 12, 2021
  6. Eric SunshineMay 12, 2021
  7. brian m. carlsonMay 12, 2021
  8. Felipe ContrerasMay 12, 2021
  9. brian m. carlsonMay 14, 2021
  10. Felipe ContrerasMay 15, 2021
  11. Martin ÅgrenMay 13, 2021
  12. Bagas SanjayaMay 12, 2021
  13. Felipe ContrerasMay 12, 2021
  14. brian m. carlsonMay 13, 2021
  15. Felipe ContrerasMay 14, 2021
  16. Felipe ContrerasMay 15, 2021
  17. Felipe ContrerasMay 12, 2021
  18. brian m. carlsonMay 13, 2021
  19. Felipe ContrerasMay 14, 2021
  20. Bagas SanjayaMay 12, 2021
  21. brian m. carlsonMay 13, 2021
  22. Jeff KingMay 12, 2021
  23. Jeff KingMay 12, 2021
  24. Jeff KingMay 12, 2021
  25. Felipe ContrerasMay 12, 2021
  26. Martin ÅgrenMay 13, 2021
  27. Felipe ContrerasMay 13, 2021
  28. Eric SunshineMay 12, 2021
  29. Jeff KingMay 12, 2021
  30. Martin ÅgrenMay 14, 2021
  31. 0/2 Asciidoctor native manpage buildsbrian m. carlson, May 14, 2021
  32. 1/2 doc: add an option to have Asciidoctor build man pages directlybrian m. carlson, May 14, 2021
  33. Junio C HamanoMay 14, 2021
  34. Jeff KingMay 14, 2021
  35. Felipe ContrerasMay 14, 2021
  36. brian m. carlsonMay 14, 2021
  37. Felipe ContrerasMay 14, 2021
  38. Felipe ContrerasMay 14, 2021
  39. Felipe ContrerasMay 14, 2021
  40. brian m. carlsonMay 14, 2021
  41. Felipe ContrerasMay 14, 2021
  42. 2/2 doc: remove GNU_ROFF optionbrian m. carlson, May 14, 2021
  43. Felipe ContrerasMay 14, 2021
  44. brian m. carlsonMay 14, 2021
  45. Felipe ContrerasMay 14, 2021

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.