From: Junio C Hamano <gitster@pobox.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: git@vger.kernel.org
Subject: Re: implement a stable 'Last updated' in Documentation
Date: Tue, 27 Jan 2015 15:10:16 -0800 [thread overview]
Message-ID: <xmqqd25zkeg7.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150126172409.GA15204@aepfle.de> (Olaf Hering's message of "Mon, 26 Jan 2015 18:24:09 +0100")
Olaf Hering <olaf@aepfle.de> writes:
> Several files in Documentation have an unstable 'Last updated' timestamp. The
> reason is that their mtime changes every time, which prevents reproducible
> builds.
>
> 341 technical/api-index.txt: technical/api-index-skel.txt \
> 342 technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
> 343 $(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh
>
> 388 howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
> 389 $(QUIET_GEN)$(RM) $@+ $@ && \
> 390 '$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@+ && \
> 391 mv $@+ $@
>
> 399 $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
> 400 $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
> 401 sed -e '1,/^$$/d' $< | \
> 402 $(TXT_TO_HTML) - >$@+ && \
> 403 mv $@+ $@
All of them seem to have dependencies so it seems to me that two
builds back to back without actually changing their input would not
re-build anything. What am I missing???
> 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.
If I check out v1.8.5 and build documentation now, it does not
matter if the generated documentation had the timestamp of the
checkout of individual files or that of a single file generated
during the build process, i.e. ../version. Neither has much
relevance to the time the actual contents of the documentation was
prepared or what vintage of the software the documentation is for.
I am fine with branding generated documentation with the version
number (i.e. "You are reading the documentation for Git version
2.2.0"). Replacing that statement with "You are reading the
documentation for a version of Git that was committed on such and
such time" is also fine. But using file timestamp would not help
either.
And that practice of using file timestamp is doubly bad by leading
misguided people to want to set timestamps of all the files by
copying commit timestamp. That is backwards, I would think.
next prev parent reply other threads:[~2015-01-27 23:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 17:24 implement a stable 'Last updated' in Documentation Olaf Hering
2015-01-27 11:11 ` Olaf Hering
2015-01-27 23:10 ` Junio C Hamano [this message]
2015-01-28 8:02 ` Olaf Hering
2015-01-29 6:18 ` Junio C Hamano
2015-01-30 10:05 ` Michael J Gruber
2015-01-30 15:07 ` Jeff King
2015-02-10 15:17 ` Olaf Hering
2015-02-10 18:43 ` Jeff King
2016-09-01 14:37 ` Olaf Hering
2016-09-01 20:17 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqd25zkeg7.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=olaf@aepfle.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.