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 16, 2019, 00:28 UTC
Message-ID
<20190516002831.GC124956@thyrsus.com>
In-Reply-To
<998895a9-cfbb-c458-cc88-fa1aabed4389@gmail.com>
Derrick Stolee <stolee@gmail.com>:
> What problem are you trying to solve where commit date is important?
I don't know what Jason's are.  I know what mine are.
A. Portable commit identifiers
1. When I in-migrate a repository from (say) Subversion with
reposurgeon, I want to be able to patch change comments so that (say)
r2367 becomes a unique reference to its corresponding commit. I do
not want the kludge of appending a relic SVN-ID header to be *required*,
though some customers may choose that. Requirung that is an orthogonality
violation.
2. Because I think in decadal timescales about infrastructure, I want
my commit references to be in a format that won't break when the history
is forward-migrated to the *next* VCS. That pretty much eliminates any
from of opaque hash. (Git itself will have a weaker version of this problem
when you change hash formats.)
3. Accordingly, I invented action stamps. This is an action stamp:
<esr@thyrsus.com!2019-05-15T20:01:15Z>. One reason I want timestamp
uniqueness is for action-stamp uniqueness.
B. Unique canonical form of import-stream representation.

Reposurgeon is a very complex piece of software with subtle failure modes. I have a strong need to be able to regression-test its operation. Right now there are important cases in which I can't do that because (a) the order in which it writes commits and (b) how it colors branches, are both phase-of-moon dependent. That is, the algorithms may be deterministic but they're not documented and seem to be dependent on variables that are hidden from me.

Before import streams can have a canonical output order without hidden variables (e.g. depending only on visible metadata) in practice, that needs to be possible in principle. I've thought about this a lot and not only are unique commit timestamps the most natural way to make it possible, they're the only way conistent with the reality that commit comments may be altered for various good reasons during repository translation.

> P.S. All of my (overly strong) opinions on using commit date are made
> more valid when you realize anyone can set GIT_COMMITTER_DATE to get
> an arbitrary commit date.

In the way I would write things, you can *request* that date, but in case of a collision you might actually get one a few microseconds off that preserves its order relationship with your other commits.

-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Previous: Ævar Arnfjörð BjarmasonNext: Derrick Stolee
Message 6 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.