git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] doc: set actual revdate for manpages
@ 2023-04-13  7:47 Felipe Contreras
  2023-04-14  7:04 ` Jeff King
  0 siblings, 1 reply; 14+ messages in thread
From: Felipe Contreras @ 2023-04-13  7:47 UTC (permalink / raw)
  To: git; +Cc: Jeff King, Junio C Hamano, Felipe Contreras

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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-04-14 22:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13  7:47 [PATCH] doc: set actual revdate for manpages Felipe Contreras
2023-04-14  7:04 ` Jeff King
2023-04-14 12:40   ` Felipe Contreras
2023-04-14 16:46     ` Junio C Hamano
2023-04-14 17:14       ` Junio C Hamano
2023-04-14 18:40         ` Felipe Contreras
2023-04-14 18:26       ` Felipe Contreras
2023-04-14 21:45       ` Jeff King
2023-04-14 22:06         ` Junio C Hamano
2023-04-14 21:35     ` Jeff King
2023-04-14 15:27   ` Junio C Hamano
2023-04-14 16:20     ` Felipe Contreras
2023-04-14 17:36       ` Junio C Hamano
2023-04-14 18:59         ` Felipe Contreras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).