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

Re: Finer timestamps and serialization in git

From
Eric S. Raymond <esr@thyrsus.com>
Date
May 19, 2019, 04:09 UTC
Message-ID
<20190519040902.GA32780@thyrsus.com>
In-Reply-To
<b4b151ba-ab43-445f-6e49-ee8e28b30859@iee.org>
Philip Oakley <philipoakley@iee.org>:
Show 8 quoted lines
> > But I don't quite understand your claim that there's no format
> > breakage here, unless you're implying to me that timestamps are already
> > stored in the git file system as variable-length strings.  Do they
> > really never get translated into time_t?  Good news if so.
> Maybe just take some of the object ID bits as being the fractional time
> timestamp. They are effectively random, so should do a reasonable job of
> distinguishing commits in a repeatable manner, even with full round tripping
> via older git versions (as long as the sha1 replicates...)

Huh. That's an interesting idea. Doesn't absolutely guarantee uniqueness, but even with birthday effect the probability of collisions could be pulled arbitrarily low.

Show 6 quoted lines
> As I understand it the commit timestamp is actually free text within the
> commit object (try `git cat-file -p <commit_object>), so the issue is
> whether the particular git version is ready to accept the additional 'dot'
> factional time notation (future versions could be extended, but I think old
> ones would reject them if I understand the test up thread - which would
> compromise backward compatibility and round tripping).

Nobody seems to want to grapple with the fact that changing hash formats is as large or larger a problem in exactly the same way.

I'm not saying that changing the timestamp granularity justifies a format break. I'm saying that *since you're going to have one anyway*, the option to increase timestamp precision at the same time should not be missed.

-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Previous: Philip OakleyNext: Philip Oakley
Message 14 of 33 in “Finer timestamps and serialization in git”
  1. Eric S. RaymondMay 15, 2019
  2. Derrick StoleeMay 15, 2019
  3. Jason PyeronMay 15, 2019
  4. Derrick StoleeMay 15, 2019
  5. Ævar Arnfjörð BjarmasonMay 15, 2019
  6. Eric S. RaymondMay 16, 2019
  7. Derrick StoleeMay 16, 2019
  8. Michal SuchánekMay 20, 2019
  9. Eric S. RaymondMay 20, 2019
  10. Derrick StoleeMay 20, 2019
  11. Eric S. RaymondMay 20, 2019
  12. Eric S. RaymondMay 15, 2019
  13. Philip OakleyMay 19, 2019
  14. Eric S. RaymondMay 19, 2019
  15. Philip OakleyMay 19, 2019
  16. Eric S. RaymondMay 15, 2019
  17. Derrick StoleeMay 16, 2019
  18. Ævar Arnfjörð BjarmasonMay 16, 2019
  19. Jakub NarebskiMay 19, 2019
  20. Eric S. RaymondMay 20, 2019
  21. Jakub NarebskiMay 20, 2019
  22. Ævar Arnfjörð BjarmasonMay 20, 2019
  23. Jeff KingMay 20, 2019
  24. Eric S. RaymondMay 20, 2019
  25. Michal SuchánekMay 20, 2019
  26. Philip OakleyMay 20, 2019
  27. Elijah NewrenMay 20, 2019
  28. Eric S. RaymondMay 20, 2019
  29. Jakub NarebskiMay 21, 2019
  30. Eric S. RaymondMay 21, 2019
  31. Ævar Arnfjörð BjarmasonMay 15, 2019
  32. Eric S. RaymondMay 16, 2019
  33. Jeff KingMay 16, 2019

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.