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

Re: implement a stable 'Last updated' in Documentation

From
Olaf Hering <olaf@aepfle.de>
Date
Jan 28, 2015, 08:02 UTC
Message-ID
<20150128080214.GA18851@aepfle.de>
In-Reply-To
<xmqqd25zkeg7.fsf@gitster.dls.corp.google.com>
On Tue, Jan 27, Junio C Hamano wrote:
Show 24 quoted lines
> 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???

Per default the files referenced do not exist, so a build from releases will generate the files. But I agree, perhaps there should be some refactoring to handle dependencies properly. In any case, if the 'Last updated' is unavoidable some reference is required, see my patch in the other mail.

Show 5 quoted lines
> > 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. But so far I found no way to avoid the 'Last updated' output. The docs and google suggest something like :last-updated-time!:, which did not work for me.

Olaf
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 11 in “implement a stable 'Last updated' in Documentation”
  1. Olaf HeringJan 26, 2015
  2. Olaf HeringJan 27, 2015
  3. Junio C HamanoJan 27, 2015
  4. Olaf HeringJan 28, 2015
  5. Junio C HamanoJan 29, 2015
  6. Michael J GruberJan 30, 2015
  7. Jeff KingJan 30, 2015
  8. Olaf HeringFeb 10, 2015
  9. Jeff KingFeb 10, 2015
  10. Olaf HeringSep 1, 2016
  11. Jeff KingSep 1, 2016

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.