Re: implement a stable 'Last updated' in Documentation

7 messages, 4 authors, 2016-09-01 · open the first message on its own page

Re: implement a stable 'Last updated' in Documentation

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:03:42

Olaf Hering [off-list ref] writes:
On Tue, Jan 27, Junio C Hamano wrote:
quoted
quoted
What file timestamp should be used for them? Likely "../version"?
I tend to think the "Last updated" timestamp taken from the
filesystem timestamp is a bad practice inherited by these tools from
the days back when nobody used any revision control systems.
I'm not sure. The bug is that such 'Last updated' line exists at all in
the default output. Noone asked for it, noone really needs it. And it
makes it impossible to get reproducible builds.
Amen to that ;-)

Re: implement a stable 'Last updated' in Documentation

From: Michael J Gruber <hidden>
Date: 2016-06-15 23:03:42

Junio C Hamano schrieb am 29.01.2015 um 07:18:
Olaf Hering [off-list ref] writes:
quoted
On Tue, Jan 27, Junio C Hamano wrote:
quoted
quoted
What file timestamp should be used for them? Likely "../version"?
I tend to think the "Last updated" timestamp taken from the
filesystem timestamp is a bad practice inherited by these tools from
the days back when nobody used any revision control systems.
I'm not sure. The bug is that such 'Last updated' line exists at all in
the default output. Noone asked for it, noone really needs it. And it
makes it impossible to get reproducible builds.
Amen to that ;-)
It's a shame one can't simply replace the [footer-text] template which
asciidoc insists on.

It turns out asciidoc 8.6.9-3 and later will habe a knob to turn:

https://github.com/asciidoc/asciidoc/pull/9

I'll try and get my hands on it to see whether we can simply use that.
I'm wondering though which is more useful - the version of the tree the
doc is processed from, or the version of the last commit changing the
corresponding doc source file. The first one changes even when the doc
source is unchanged (but is stable between reruns, of course).

Michael

Re: implement a stable 'Last updated' in Documentation

From: Jeff King <hidden>
Date: 2016-06-15 23:03:42

On Fri, Jan 30, 2015 at 11:05:36AM +0100, Michael J Gruber wrote:
It's a shame one can't simply replace the [footer-text] template which
asciidoc insists on.

It turns out asciidoc 8.6.9-3 and later will habe a knob to turn:

https://github.com/asciidoc/asciidoc/pull/9

I'll try and get my hands on it to see whether we can simply use that.
I'm wondering though which is more useful - the version of the tree the
doc is processed from, or the version of the last commit changing the
corresponding doc source file. The first one changes even when the doc
source is unchanged (but is stable between reruns, of course).
I have 8.6.9-3 installed (it is part of Debian testing/unstable now),
and confirmed that:
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 2c16c53..10c777e 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -21,6 +21,7 @@ tilde=&#126;
 apostrophe=&#39;
 backtick=&#96;
 litdd=&#45;&#45;
+footer-style=none
 
 ifdef::backend-docbook[]
 [linkgit-inlinemacro]
drops the "last-updated" footer.

But note that this only affects the generated HTML. The manpages still
get the date in their footer. But this isn't an asciidoc-ism at all;
it's added by docbook when converting the xml to roff. I'm sure there is
a way to tweak that, too, but looking at docbook gives me nightmares.

-Peff

Re: implement a stable 'Last updated' in Documentation

From: Olaf Hering <hidden>
Date: 2016-06-15 23:03:47

On Fri, Jan 30, Jeff King wrote:
quoted hunk
I have 8.6.9-3 installed (it is part of Debian testing/unstable now),
and confirmed that:
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 2c16c53..10c777e 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -21,6 +21,7 @@ tilde=&#126;
 apostrophe=&#39;
 backtick=&#96;
 litdd=&#45;&#45;
+footer-style=none
 
 ifdef::backend-docbook[]
 [linkgit-inlinemacro]
drops the "last-updated" footer.
This does not remove "Last updated" from files like
using-merge-subtree.html for me, using asciidoc-8.6.8.

Olaf

Re: implement a stable 'Last updated' in Documentation

From: Jeff King <hidden>
Date: 2016-06-15 23:03:47

On Tue, Feb 10, 2015 at 04:17:47PM +0100, Olaf Hering wrote:
On Fri, Jan 30, Jeff King wrote:
quoted
I have 8.6.9-3 installed (it is part of Debian testing/unstable now),
and confirmed that:
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 2c16c53..10c777e 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -21,6 +21,7 @@ tilde=&#126;
 apostrophe=&#39;
 backtick=&#96;
 litdd=&#45;&#45;
+footer-style=none
 
 ifdef::backend-docbook[]
 [linkgit-inlinemacro]
drops the "last-updated" footer.
This does not remove "Last updated" from files like
using-merge-subtree.html for me, using asciidoc-8.6.8.
Yes, the feature is part of 8.6.9-3.

-Peff

Re: implement a stable 'Last updated' in Documentation

From: Olaf Hering <hidden>
Date: 2016-09-01 14:37:49

Hey, asciidoc made a move, so this patch is good to go:
https://github.com/asciidoc/asciidoc/pull/9

Thanks.

Olaf

On Tue, Feb 10, Jeff King wrote:
On Tue, Feb 10, 2015 at 04:17:47PM +0100, Olaf Hering wrote:
quoted
On Fri, Jan 30, Jeff King wrote:
quoted
I have 8.6.9-3 installed (it is part of Debian testing/unstable now),
and confirmed that:
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 2c16c53..10c777e 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -21,6 +21,7 @@ tilde=&#126;
 apostrophe=&#39;
 backtick=&#96;
 litdd=&#45;&#45;
+footer-style=none
 
 ifdef::backend-docbook[]
 [linkgit-inlinemacro]
drops the "last-updated" footer.
This does not remove "Last updated" from files like
using-merge-subtree.html for me, using asciidoc-8.6.8.
Yes, the feature is part of 8.6.9-3.

-Peff

Re: implement a stable 'Last updated' in Documentation

From: Jeff King <hidden>
Date: 2016-09-01 21:18:04

On Thu, Sep 01, 2016 at 04:37:36PM +0200, Olaf Hering wrote:
Hey, asciidoc made a move, so this patch is good to go:
https://github.com/asciidoc/asciidoc/pull/9
Sine this thread is 18 months old, I needed some recap to remember what
we were talking about. :)

It's here:

  http://public-inbox.org/git/20150126172409.GA15204@aepfle.de/T/#u

and the gist of it is that we'd like to drop the "Last updated" footer
from the HTML version of the manpages, but older versions of asciidoc
did not provide a mechanism.

The patch you quoted adds "footer-style=none", which would do the trick.
But I have two open questions:

  1. What does this do on older versions of asciidoc? Is it silently
     ignored (ok), or does it generate an error (bad)?

  2. This covers the HTML versions, but not the roff manpages (which
     are generated by docbook). Do we have a way to tweak the date in
     the latter?

     I don't think that's necessarily a requirement for this patch, but
     it is worth thinking about at the same time.

Assuming the answer to (1) is "ok" and (2) is "no, but it's hard because
docbook is scary, so let's punt", then somebody needs to write up the
commit message and send the actual patch to the list. Would you like to
try that?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help