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

Re: I have end-of-lifed cvsps

From
Jeff King <peff@peff.net>
Date
Dec 18, 2013, 17:46 UTC
Message-ID
<20131218174615.GA5597@sigill.intra.peff.net>
In-Reply-To
<20131218162710.GA3573@thyrsus.com>
On Wed, Dec 18, 2013 at 11:27:10AM -0500, Eric S. Raymond wrote:
Show 10 quoted lines
> For use in reposurgeon I have defined a generic cross-VCS reference to
> commit I call an "action stamp"; it consists of an RFC3339 date followed by 
> a committer email address. Here's an example:
> 
> 	 2013-02-06T09:35:10Z!esr@thyrsus.com
> 
> In any VCS with changesets (git, Subversion, bzr, Mercurial) this
> almost always suffices to uniquely identify a commit. The "almost" is
> because in these systems it is possible for a user to do multiple commits
> in the same second.
FWIW, this has quite a few collisions in git.git:
  $ git log --format='%ct %ce' | sort | uniq -c | sort -rn | head
     22 1172221032 normalperson@yhbt.net
     22 1172221031 normalperson@yhbt.net
     22 1172221029 normalperson@yhbt.net
     21 1190197351 gitster@pobox.com
     21 1172221030 normalperson@yhbt.net
     20 1190197350 gitster@pobox.com
     17 1172221033 normalperson@yhbt.net
     15 1263457676 gitster@pobox.com
     15 1193717011 gitster@pobox.com
     14 1367447590 gitster@pobox.com

In git, it may happen quite a bit during "git am" or "git rebase", in which a large number of commits are replayed in a tight loop. You can use the author timestamp instead, but it also collides (try "%at %ae" in the above command instead).

> And now you know why I wish git had subsecond timestamp resolution!  If it
> did, uniqueness of these in a git stream could be guaranteed.

It's still not guaranteed. Even with sufficient resolution that no two operations could possibly complete in the same time unit, clocks do not always march forward. They get reset, they may skew from machine to machine, the same operation may happen on different machines, etc. The probability of such collisions is significantly reduced, though, if only because the extra precision adds an essentially random factor.

But in some cases you might even see the same commit "replayed" on top of different parts of the graph, or affecting different paths (e.g., by filter-branch). I.e., no matter what your precision, multiple hacked-up views of the changeset will still always have that same timestamp.

-Peff
Previous: Kent R. SpillnerNext: Eric S. Raymond
Message 45 of 48 in “I have end-of-lifed cvsps”
  1. Eric S. RaymondDec 12, 2013
  2. Martin LanghoffDec 12, 2013
  3. Eric S. RaymondDec 12, 2013
  4. Martin LanghoffDec 12, 2013
  5. Andreas KreyDec 12, 2013
  6. Martin LanghoffDec 12, 2013
  7. Eric S. RaymondDec 12, 2013
  8. Eric S. RaymondDec 12, 2013
  9. Martin LanghoffDec 12, 2013
  10. Eric S. RaymondDec 12, 2013
  11. Martin LanghoffDec 12, 2013
  12. Eric S. RaymondDec 12, 2013
  13. Martin LanghoffDec 12, 2013
  14. Eric S. RaymondDec 12, 2013
  15. Martin LanghoffDec 13, 2013
  16. Eric S. RaymondDec 13, 2013
  17. Eric S. RaymondDec 12, 2013
  18. Martin LanghoffDec 12, 2013
  19. Jakub NarębskiDec 17, 2013
  20. Johan HerlandDec 17, 2013
  21. Eric S. RaymondDec 17, 2013
  22. Johan HerlandDec 17, 2013
  23. Eric S. RaymondDec 17, 2013
  24. Johan HerlandDec 17, 2013
  25. Eric S. RaymondDec 17, 2013
  26. Michael HaggertyDec 18, 2013
  27. Johan HerlandDec 19, 2013
  28. Michael HaggertyDec 19, 2013
  29. Johan HerlandDec 19, 2013
  30. Michael HaggertyDec 19, 2013
  31. Eric S. RaymondDec 19, 2013
  32. Michael HaggertyDec 19, 2013
  33. Eric S. RaymondDec 17, 2013
  34. Jakub NarębskiDec 17, 2013
  35. Eric S. RaymondDec 17, 2013
  36. Jakub NarębskiDec 18, 2013
  37. Eric S. RaymondDec 18, 2013
  38. Jakub NarębskiDec 18, 2013
  39. incremental fast-import and marks (Re: I have end-of-lifed cvsps)Jonathan Nieder, Dec 18, 2013
  40. Eric S. RaymondDec 18, 2013
  41. Martin LanghoffDec 18, 2013
  42. John KeepingDec 18, 2013
  43. Eric S. RaymondDec 18, 2013
  44. Kent R. SpillnerDec 18, 2013
  45. Jeff KingDec 18, 2013
  46. Eric S. RaymondDec 18, 2013
  47. Andreas SchwabDec 18, 2013
  48. Eric S. RaymondDec 18, 2013

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.