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

Re: (bug?) Inconsistent workdir file timestamps after initial clone.

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Dec 12, 2012, 15:48 UTC
Message-ID
<50C8A766.30303@xiplink.com>
In-Reply-To
<7vr4mw6x3p.fsf@alter.siamese.dyndns.org>
On 12-12-11 05:30 PM, Junio C Hamano wrote:
Show 12 quoted lines
> Marc Branchaud <marcnarc@xiplink.com> writes:
> 
>> My point is that the initial checkout into an empty working directory should
>> create all files with the same timestamp.
>>
>> Or, to be a bit more precise, whenever git-checkout *creates* files in the
>> work dir, *all* the created files should have the *same* timestamp (i.e. the
>> current time measured at the start of the checkout's execution, not some
>> bizarro other time specified by some arcane heuristic).
> 
> My knee-jerk reaction is that it is insane to do so, but what other
> SCM does such a thing?
I'm lucky enough to just care about git these days.
> Even "tar xf" wouldn't do that, I think.

"tar xf" uses the timestamps that are stored in the tar file. I see this as an argument against git's exact-current-time-per-file approach: even the tar guys understand that it's insane.

Show 13 quoted lines
>>> While not including files that can be rebuilt from the source may be
>>> the ideal solution, I've seen projects hide rules to rebuild such a
>>> "generated but needs special tools to build" and/or a "generated but
>>> normal developers do not have any business rebuilding" file (in your
>>> case, Makefile.in) in their Makefiles from the normal targets (like
>>> "make all") for this exact reason, when they choose to distribute
>>> such files by including in their commits.
>>
>> I prefer to use the third-party code as-is, without hacking it, to have
>> smooth upgrades in the future.
> 
> Then perhaps take the complaints to that third-party upstream, not
> here?

Well, I thought that while I wait for some dozen-or-so projects to accept changes to their builds, it might be nice for git to solve this problem for me. It is, after all, an effect of the way git operates.

		M.
Previous: Junio C HamanoNext: Torsten Bögershausen
Message 5 of 7 in “(bug?) Inconsistent workdir file timestamps after initial clone.”
  1. Marc BranchaudDec 11, 2012
  2. Junio C HamanoDec 11, 2012
  3. Marc BranchaudDec 11, 2012
  4. Junio C HamanoDec 11, 2012
  5. Marc BranchaudDec 12, 2012
  6. Torsten BögershausenDec 12, 2012
  7. Pyeron, Jason J CTR (US)Dec 12, 2012

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.