From 1c301bcaa56fee40d5c52ddc3a6c3f03b350073c Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Wed, 3 May 2023 17:23:49 -0600 Subject: doc: doc-diff: specify date Earlier we changed the manual page formatting machinery to use the dates from the commit the documentation source was taken from, instead of the date the manual page was produced. When "doc-diff" compares two commits from different dates, the different dates from the two commits would result in unnecessary differences in the output because of the change. Compensate by setting a fixed date when "doc-diff" formats the pages to be compared to work around this issue. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- Documentation/doc-diff | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/doc-diff b/Documentation/doc-diff index 1694300e50..554a78a12d 100755 --- a/Documentation/doc-diff +++ b/Documentation/doc-diff @@ -153,6 +153,7 @@ render_tree () { make -j$parallel -C "$tmp/worktree" \ $makemanflags \ GIT_VERSION=omitted \ + GIT_DATE=1970-01-01 \ SOURCE_DATE_EPOCH=0 \ DESTDIR="$tmp/installed/$dname+" \ install-man && -- cgit v1.2.1 From 836088d80cda9286a614a659c5eb235f83be5397 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 5 May 2023 17:16:10 -0400 Subject: doc-diff: drop SOURCE_DATE_EPOCH override The original doc-diff script set SOURCE_DATE_EPOCH to make asciidoc's output deterministic. Otherwise, the mtime of the source files would end up in the footer of the manpage, causing noisy and uninteresting diff hunks. But this has been unused since 28fde3a1f4 (doc: set actual revdate for manpages, 2023-04-13), as the footer uses the externally-specified GIT_DATE instead (that needs to be set consistently, too, which it now is as of the previous commit). Asciidoc sets several automatic attributes based on the mtime (or manual epoch), so it's still possible to write a document that would need SOURCE_DATE_EPOCH set to be deterministic. But if we wrote such a thing, it's probably a mistake, and we're better off having doc-diff loudly show it. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/doc-diff | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/doc-diff b/Documentation/doc-diff index 554a78a12d..fb09e0ac0e 100755 --- a/Documentation/doc-diff +++ b/Documentation/doc-diff @@ -154,7 +154,6 @@ render_tree () { $makemanflags \ GIT_VERSION=omitted \ GIT_DATE=1970-01-01 \ - SOURCE_DATE_EPOCH=0 \ DESTDIR="$tmp/installed/$dname+" \ install-man && mv "$tmp/installed/$dname+" "$tmp/installed/$dname" -- cgit v1.2.1