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

Re: [PATCH] doc: simplify man version

From
Jeff King <peff@peff.net>
Date
Apr 9, 2023, 19:08 UTC
Message-ID
<20230409190805.GA77061@coredump.intra.peff.net>
In-Reply-To
<xmqqr0suf0wz.fsf@gitster.g>
On Sat, Apr 08, 2023 at 03:45:48PM -0700, Junio C Hamano wrote:
Show 26 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > index a6ba5bd460..4721b000c1 100644
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -150,8 +150,7 @@ ASCIIDOC_HTML = xhtml11
> >  ASCIIDOC_DOCBOOK = docbook
> >  ASCIIDOC_CONF = -f asciidoc.conf
> >  ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
> > -		-amanversion=$(GIT_VERSION) \
> > -		-amanmanual='Git Manual' -amansource='Git'
> > +		-amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)'
> >  ASCIIDOC_DEPS = asciidoc.conf GIT-ASCIIDOCFLAGS
> >  TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
> >  TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)
> 
> Is this a complete patch, or will this leave us in an incomplete
> in-between place?
> 
> We have some references to manversion in "git grep manversion
> Documentation/" in asciidoc.conf and asciidoctor-extensions.rb
> remaining after this ptach is applied, which presumably are no
> longer used.  I would imagine that these leftover references end up
> substituting them with something benign, like an empty string, in
> the output, but it somehow makes me feel dirty [*].

I think we are OK with this patch on its own. Asciidoc seems to be smart enough to omit the empty XML element on its own. Asciidoctor isn't (and nor is ruby hack which adds it in), but docbook is essentially just concatenating them anyway. Either way, the generated roff looks like:

  .TH "GIT" "1" "2023\-04\-06" "Git 2\&.40\&.0\&.316\&.g67fafd" "Git Manual"
(the first "GIT" is the command name, so this is from git.1).

I do think we probably want to pair this with another patch removing the asciidoctor-extensions hack, but the reasoning there is separate (it was needed for some older versions that we can probably declare as "too old" now).

-Peff
Previous: Junio C HamanoNext: Felipe Contreras
Message 3 of 8 in “doc: simplify man version”
  1. doc: simplify man versionFelipe Contreras, Apr 8, 2023
  2. Junio C HamanoApr 8, 2023
  3. Jeff KingApr 9, 2023
  4. Felipe ContrerasApr 10, 2023
  5. Junio C HamanoApr 10, 2023
  6. Felipe ContrerasApr 10, 2023
  7. Junio C HamanoApr 11, 2023
  8. Felipe ContrerasApr 16, 2023

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.