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

Re: git and mtime

From
Matthias Kestenholz <mk@feinheit.ch>
Date
Nov 20, 2008, 18:36 UTC
Message-ID
<A12D78B0-7CC0-4877-AB91-A547AE1A7EC8@feinheit.ch>
In-Reply-To
<20081120151925.GE6023@codelibre.net>
On 20.11.2008, at 16:19, Roger Leigh wrote:
Show 8 quoted lines
>>
>> Then write a hook for it. You agree that for most users this will be
>> totally insane, and yet you request that it's added in a place where
>> everyone will have to pay the performance/diskspace penalty for it
>> but only a handful will get any benefits. That's patently absurd.
>
> The cost is tiny.  The extra space would be smaller than a single
> SHA1 hash.

No, the cost is huge. The SHA-1 for the tree with _exactly the same contents_ will be different, just because f.e you applied a patch one second earlier than I did, and that's completely insane. Git is purely a content tracker as has been said numerous times on this mailing list, and that is for good reasons. If the tree entries change just because some timestamps are different, the CPU time needed to generate a diff will grow by a big amount of time.

Atempts to add additional information to the basic git objects have failed several times, and yours will probably fail too since there are numerous reasons why you do _not_ want a timestamp in the tree _and_ there are several workarounds for your problem, which at least in my opinion seem much less insane than adding timestamps...

>> Especially since there are such easy workarounds that you can put in
>> place yourself instead.
>
Previous: Andreas EricssonNext: Randal L. Schwartz
Message 23 of 33 in “git and mtime”
  1. Roger LeighNov 19, 2008
  2. Matthias KestenholzNov 19, 2008
  3. Andreas EricssonNov 20, 2008
  4. Roger LeighNov 20, 2008
  5. Andreas EricssonNov 20, 2008
  6. Andreas EricssonNov 20, 2008
  7. Johannes SchindelinNov 19, 2008
  8. ArafangionNov 19, 2008
  9. Matthieu MoyNov 19, 2008
  10. Andreas EricssonNov 20, 2008
  11. Johannes SchindelinNov 20, 2008
  12. Matthieu MoyNov 20, 2008
  13. Jakub NarebskiNov 19, 2008
  14. Christian MICHONNov 19, 2008
  15. Johannes SchindelinNov 20, 2008
  16. Roger LeighNov 20, 2008
  17. Andreas EricssonNov 20, 2008
  18. Roger LeighNov 20, 2008
  19. Andreas EricssonNov 20, 2008
  20. Roger LeighNov 20, 2008
  21. Kyle MoffettNov 20, 2008
  22. Andreas EricssonNov 20, 2008
  23. Matthias KestenholzNov 20, 2008
  24. Randal L. SchwartzNov 20, 2008
  25. Roger LeighNov 20, 2008
  26. Daniel BarkalowNov 20, 2008
  27. Joey HessNov 20, 2008
  28. martin f krafftNov 20, 2008
  29. Roger LeighNov 20, 2008
  30. martin f krafftNov 20, 2008
  31. Samuel TardieuNov 20, 2008
  32. Johannes SchindelinNov 20, 2008
  33. Roger LeighNov 20, 2008

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.