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

[PATCH] doc: set actual revdate for manpages

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 13, 2023, 07:47 UTC
Message-ID
<20230413074722.71260-1-felipe.contreras@gmail.com>

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 <felipe.contreras@gmail.com>
---

This patch requires [1] to actually work, and has a simple conflict with [2], so it's written on top of both.

[1] https://lore.kernel.org/git/20230323221523.52472-1-felipe.contreras@gmail.com/ [2] https://lore.kernel.org/git/20230408001829.11031-1-felipe.contreras@gmail.com/

 Documentation/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 3133ea3182..b629176d7d 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -144,13 +144,16 @@ man5dir = $(mandir)/man5
 man7dir = $(mandir)/man7
 # DESTDIR =
 
+GIT_DATE := $(shell git show --quiet --pretty='%as')
+
 ASCIIDOC = asciidoc
 ASCIIDOC_EXTRA =
 ASCIIDOC_HTML = xhtml11
 ASCIIDOC_DOCBOOK = docbook
 ASCIIDOC_CONF = -f asciidoc.conf
 ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
-		-amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)'
+		-amanmanual='Git Manual' -amansource='Git $(GIT_VERSION)' \
+		-arevdate='$(GIT_DATE)'
 ASCIIDOC_DEPS = asciidoc.conf GIT-ASCIIDOCFLAGS
 TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
 TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)
-- 
2.40.0+fc1
Next: Jeff King
Message 1 of 14 in “doc: set actual revdate for manpages”
  1. doc: set actual revdate for manpagesFelipe Contreras, Apr 13, 2023
  2. Jeff KingApr 14, 2023
  3. Felipe ContrerasApr 14, 2023
  4. Junio C HamanoApr 14, 2023
  5. Junio C HamanoApr 14, 2023
  6. Felipe ContrerasApr 14, 2023
  7. Felipe ContrerasApr 14, 2023
  8. Jeff KingApr 14, 2023
  9. Junio C HamanoApr 14, 2023
  10. Jeff KingApr 14, 2023
  11. Junio C HamanoApr 14, 2023
  12. Felipe ContrerasApr 14, 2023
  13. Junio C HamanoApr 14, 2023
  14. Felipe ContrerasApr 14, 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.