Skip to content

Commit 28fde3a

Browse files
felipecgitster
authored andcommitted
doc: set actual revdate for manpages
manpages expect the date of the last revision, if that is not found DocBook Stylesheets go through a series of hacks to generate one with the format `%d/%d/%Y` which is not ideal. In addition to this format not being standard, different tools generate dates with different formats. There's no need for any confusion if we specify the revision date, so let's do so. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent df113b5 commit 28fde3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Documentation/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,16 @@ man5dir = $(mandir)/man5
144144
man7dir = $(mandir)/man7
145145
# DESTDIR =
146146

147+
GIT_DATE := $(shell git show --quiet --pretty='%as')
148+
147149
ASCIIDOC = asciidoc
148150
ASCIIDOC_EXTRA =
149151
ASCIIDOC_HTML = xhtml11
150152
ASCIIDOC_DOCBOOK = docbook
151153
ASCIIDOC_CONF = -f asciidoc.conf
152154
ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
153-
-amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)'
155+
-amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)' \
156+
-arevdate='$(GIT_DATE)'
154157
ASCIIDOC_DEPS = asciidoc.conf GIT-ASCIIDOCFLAGS
155158
TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
156159
TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)

0 commit comments

Comments
 (0)