Skip to content

Commit 9a09ed3

Browse files
felipecgitster
authored andcommitted
doc: simplify man version
The hacks to add version information to the man pages comes from 2007 7ef195b (Documentation: Add version information to man pages, 2007-03-25). In that code we passed three fields to DocBook Stylesheets: `source`, `version`, and `manual`, however, all the stylesheets do is join the strings `source` and `version` [1]. Their own documentation explains that in pracice the source is just a combination of two fields [2]: In practice, there are many pages that simply have a version number in the "source" field. Splitting that information might have seemed more proper in 2007, but it not achieve anything in practice. Asciidoctor had support for this information in their manpage backend since day 1: v1.5.3 (2015), but it didn't include the version. In the docbook5 backend they did in v1.5.7 (2018), but again: no version. There is no need for us to demand that that they add support for the version field when in reality all that is going to happen is that both fields are going to be joined. Let's do that ourselves so we can forget about all our hacks for this and so it works for both asciidoc.py, and docbook5 and manpage backends of asciidoctor. [1] https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/common/refentry.xsl#L545 [2] https://docbook.sourceforge.net/release/xsl/current/doc/common/template.get.refentry.source.html Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7556e5d commit 9a09ed3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Documentation/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@ ASCIIDOC_HTML = xhtml11
150150
ASCIIDOC_DOCBOOK = docbook
151151
ASCIIDOC_CONF = -f asciidoc.conf
152152
ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
153-
-amanversion=$(GIT_VERSION) \
154-
-amanmanual='Git Manual' -amansource='Git'
153+
-amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)'
155154
ASCIIDOC_DEPS = asciidoc.conf GIT-ASCIIDOCFLAGS
156155
TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
157156
TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)

0 commit comments

Comments
 (0)