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

Re: Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Apr 8, 2025, 15:58 UTC
Message-ID
<3a5eeaef-05a1-4e04-8bc5-0d023e63f27c@gmail.com>
In-Reply-To
<xmqqwmbuybhg.fsf@gitster.g>
On 08/04/2025 15:27, Junio C Hamano wrote:
Show 59 quoted lines
> Martin von Zweigbergk <martinvonz@google.com> writes:
> 
>>> A set of individual commits that share the same "change ID" is,
>>> unlike reflog entries which is an ordered set of tip of topics, not
>>> inherently ordered.  This is inevitable in the distributed world
>>> where many people can simultaneously work on improving a single
>>> "change" in many different ways, but making it difficult if not
>>> impossible to see how things evolved, simply because you first need
>>> to figure out the order of these commits that share the same "change
>>> ID".  Some may be independently evolved from the same ancestor
>>> iteration.  Some may be repeatedly worked on on a single strand of
>>> pearls (much like how development recorded in reflog entries of a
>>> single branch in a single user set-up goes).  I guess you would need
>>> a way to record the predecessor vs successor relationship of various
>>> commits that share the same "change ID", much like commits form DAG
>>> to represent ancestor vs descendant relationship.
>>
>> That is correct. The change ID should be sufficient for handling
>> simple distributed cases involving a single remote but it's not a full
>> replacement for something like Mercurial's Changeset Evolution [1].
> 
> Just a random thought.  We could very easily replace "change ID"
> with a concept of predecessor-successor commits.
> 
> Just like we can represent parents-children NxM transitive relation
> only with 0 or more "parent" commit object headers, we can record
> zero or more "predecessor" trailer in the commit log.
> 
>   (1) a commit with no "predecessor" is like "root commit" in the
>       commit history topology.  It is a brand new change that took
>       inspiration from nobody else and that is not a polished form of
>       any other existing commit.
> 
>   (2) a commit created as a refinement for one or more existing
>       commits record each of them as "predecessor" to it.  Having
>       more than one of them is like a "merge commit" in the commit
>       history topology and represents that two patches were squashed
>       into one.
> 
>   (3) Splitting an originally large change into multiple changes can
>       be represented the same way.  They share the same commit as
>       their "predecessor".  Perhaps you have originally two-commit
>       series, A and B, and split them differently in such a way that
>       C has half of a and D has the rest of A plus B.  In which case,
>       C has A as its predecessor while D has both A and B as its
>       predecessor.
> 
>   (4) Just like we can use auxiliary data structures like bitmaps to
>       figure out reachability without following all the links in the
>       commit history topology, we should be able to learn how a new
>       change was born, and trace how it evolved into newer iteration
>       of the moral equivalent of the change, possibly as a series
>       with mutiple commits, using auxiliary data structure, which
>       would represent predecessor-successor NxM transitive relation
>       in a similar way in a form that is efficient to access.
> 
> Something like this should allow us avoid relying on "change ID"s
> that can collide elsewhere in the world without having a central
> authority to assign them.
This is similar in spirit to the "git evolve" proposal [1]. One of the 
objections to that was that it required all of the rewritten commits to 
be pushed back to the remote, rather than just the current version. So 
if I rewrite a branch three times and push the result for review all of 
the intermediate state gets pushed as well. That is because the 
intermediate commits were needed to track the chain of rewritten commits 
  to avoid the problem Elijah described [2] when trying to follow 
cherry-picked-from trailers. If the predecessor information was stored 
separately to the commit it refers to (in a notes ref for example) then 
we could in principle simplify the chain of rewrites when pushing so 
that we only need to push the final version of the commit and a mapping 
from the version that we fetched from the remote.

Tracking predecessors as you describe is certainly a more complete solution to tracking the evolution of commits and it addresses the shortcomings of change-ids you outlined in your previous mail. It is a lot more work to implement though.

Best Wishes
Phillip

[1] https://lore.kernel.org/git/pull.1356.git.1663959324.gitgitgadget@gmail.com/ [2] https://lore.kernel.org/git/CABPp-BECTrVp9X6bVmzU8LEeYsC3KbzeJvAaDPN+FgZz_uEhmA@mail.gmail.com/

Previous: Junio C HamanoNext: Nico Williams
Message 88 of 118 in “Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer”
  1. Martin von ZweigbergkApr 2, 2025
  2. Remo SenekowitschApr 2, 2025
  3. Konstantin RyabitsevApr 2, 2025
  4. Konstantin RyabitsevApr 2, 2025
  5. Martin von ZweigbergkApr 2, 2025
  6. Patrick SteinhardtApr 3, 2025
  7. Remo SenekowitschApr 3, 2025
  8. Patrick SteinhardtApr 3, 2025
  9. Elijah NewrenApr 3, 2025
  10. Remo SenekowitschApr 3, 2025
  11. Elijah NewrenApr 3, 2025
  12. Martin von ZweigbergkApr 3, 2025
  13. Patrick SteinhardtApr 4, 2025
  14. Elijah NewrenApr 3, 2025
  15. Remo SenekowitschApr 3, 2025
  16. Kane YorkApr 3, 2025
  17. Elijah NewrenApr 4, 2025
  18. Elijah NewrenApr 4, 2025
  19. Martin von ZweigbergkApr 4, 2025
  20. Nico WilliamsApr 4, 2025
  21. Elijah NewrenApr 4, 2025
  22. Martin von ZweigbergkApr 4, 2025
  23. Patrick SteinhardtApr 4, 2025
  24. Theodore Ts'oApr 3, 2025
  25. Remo SenekowitschApr 3, 2025
  26. Theodore Ts'oApr 5, 2025
  27. Nico WilliamsApr 3, 2025
  28. Remo SenekowitschApr 3, 2025
  29. Martin von ZweigbergkApr 3, 2025
  30. Nico WilliamsApr 3, 2025
  31. Martin von ZweigbergkApr 3, 2025
  32. Elijah NewrenApr 4, 2025
  33. Nico WilliamsApr 4, 2025
  34. Martin von ZweigbergkApr 4, 2025
  35. Nico WilliamsApr 4, 2025
  36. Patrick SteinhardtApr 4, 2025
  37. Nico WilliamsApr 4, 2025
  38. Patrick SteinhardtApr 7, 2025
  39. Junio C HamanoApr 7, 2025
  40. Nico WilliamsApr 7, 2025
  41. Theodore Ts'oApr 8, 2025
  42. Nico WilliamsApr 8, 2025
  43. Theodore Ts'oApr 9, 2025
  44. Junio C HamanoApr 9, 2025
  45. Nico WilliamsApr 9, 2025
  46. Junio C HamanoApr 10, 2025
  47. Martin von ZweigbergkApr 10, 2025
  48. Semantics of change IDs (Re: Gerrit, GitButler, and Jujutsu projects collaborating on change-id commit footer)Nico Williams, Apr 9, 2025
  49. Junio C HamanoApr 9, 2025
  50. Nico WilliamsApr 9, 2025
  51. Eric SunshineApr 9, 2025
  52. Nico WilliamsApr 9, 2025
  53. Theodore Ts'oApr 10, 2025
  54. Junio C HamanoApr 10, 2025
  55. Theodore Ts'oApr 11, 2025
  56. Konstantin RyabitsevApr 11, 2025
  57. Junio C HamanoApr 11, 2025
  58. Theodore Ts'oApr 12, 2025
  59. Junio C HamanoApr 14, 2025
  60. Remo SenekowitschApr 15, 2025
  61. Junio C HamanoApr 16, 2025
  62. Jacob KellerApr 16, 2025
  63. Jacob KellerApr 15, 2025
  64. D. Ben KnobleApr 14, 2025
  65. Nico WilliamsApr 14, 2025
  66. Jacob KellerApr 15, 2025
  67. Remo SenekowitschApr 16, 2025
  68. D. Ben KnobleApr 22, 2025
  69. Remo SenekowitschApr 22, 2025
  70. Junio C HamanoApr 22, 2025
  71. Remo SenekowitschApr 22, 2025
  72. Nico WilliamsApr 22, 2025
  73. Remo SenekowitschApr 22, 2025
  74. Nico WilliamsApr 23, 2025
  75. Remo SenekowitschApr 23, 2025
  76. Nico WilliamsApr 23, 2025
  77. Junio C HamanoApr 22, 2025
  78. Nico WilliamsApr 23, 2025
  79. Nico WilliamsApr 23, 2025
  80. Martin von ZweigbergkApr 23, 2025
  81. Junio C HamanoApr 23, 2025
  82. Martin von ZweigbergkApr 23, 2025
  83. Toon ClaesJun 6, 2025
  84. Remo SenekowitschApr 7, 2025
  85. Junio C HamanoApr 8, 2025
  86. Martin von ZweigbergkApr 8, 2025
  87. Junio C HamanoApr 8, 2025
  88. Phillip WoodApr 8, 2025
  89. Nico WilliamsApr 8, 2025
  90. Junio C HamanoApr 12, 2025
  91. Jacob KellerApr 16, 2025
  92. Kristoffer HaugsbakkMay 14, 2025
  93. Junio C HamanoApr 8, 2025
  94. Askar SafinAug 19, 2025
  95. Ben KnobleAug 19, 2025
  96. Remo SenekowitschApr 4, 2025
  97. Nico WilliamsApr 4, 2025
  98. Remo SenekowitschApr 4, 2025
  99. Nico WilliamsApr 4, 2025
  100. Remo SenekowitschApr 23, 2025
  101. Nico WilliamsApr 23, 2025
  102. How GitLab does/doesn't need change IDs (was Re: Semantics of change IDs)Toon Claes, Apr 23, 2025
  103. Nico WilliamsApr 23, 2025
  104. D. Ben KnobleMay 10, 2025
  105. D. Ben KnobleMay 10, 2025
  106. Martin von ZweigbergkMay 10, 2025
  107. Junio C HamanoMay 12, 2025
  108. Martin von ZweigbergkMay 12, 2025
  109. Junio C HamanoMay 14, 2025
  110. Oswald BuddenhagenMay 15, 2025
  111. Jacob KellerMay 15, 2025
  112. Junio C HamanoMay 15, 2025
  113. Nico WilliamsMay 15, 2025
  114. Martin von ZweigbergkMay 12, 2025
  115. brian m. carlsonMay 12, 2025
  116. Toon ClaesJun 6, 2025
  117. Junio C HamanoJun 6, 2025
  118. D. Ben KnobleMay 13, 2025

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.