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

Re: [PATCH v7 10/10] commit-reach: remove commit-date ordering fallback

From
Kristofer Karlsson <krka@spotify.com>
Date
Aug 7, 2026, 12:05 UTC
Message-ID
<CAL71e4OTYDrbY-kjeJSa-iWtUN=96Q+2_vEB-_tScu_afPS6EA@mail.gmail.com>
In-Reply-To
<CABPp-BFJDc5t3cCj9mZBkXs+Ee+EoWUKw2p9UXq7tSGoosqMmw@mail.gmail.com>
On Fri, 7 Aug 2026 at 05:03, Elijah Newren <newren@gmail.com> wrote:
Show 11 quoted lines
>
> >
> > For v1 commit-graphs where generation numbers saturate at
> > GENERATION_NUMBER_V1_MAX, introduce a topological ceiling that
> > the early exit gates compare against instead of
> > GENERATION_NUMBER_INFINITY. This ensures saturated commits are
> > treated as unordered, preventing premature termination when
> > generation values are unreliable.
>
> Should the work associated with this paragraph come earlier so 8/10
> doesn't have its weird split?

I am thinking that I am mostly happy with the sequencing of the code changes, but aligning it with the documentation seems to be the messy part.

I am going to spend some time on reworking the documentation overall because I think that's the main remaining work and feedback on the code changes seem to have slowed down to effectively zero (which I'm happy about, though I've always found it easier to write correct code than useful documentation, so now the real work starts).

We could of course introduce the topo_ceiling already in patch 8, but there would be no behavior change since gen_ordered is disabled for v1 commit-graphs.

But let me know if you still want me to move that code change, I don't feel too strongly about it.

> Nice seeing all the date-ordering stuff get ripped out.

Agreed, since I am new to this I have ran into multiple gotchas when dealing with both v1 and v2, so the more we can unify the code paths, the better. And I suppose the performance improvement is a nice bonus (though people who still have v1 graphs and are using the latest git version should probably just switch to v2 instead).

> Good, together with the setting of state->topo_ceiling, this fixes the
> GENERATION_NUMBER_V1_MAX issue.

I did consider making this a utility function but I realized that this was the only part of the code where topological ordering mattered for correctness so it was nice that I could avoid that.

Show 5 quoted lines
> The code and tests look good, my main issue is that the documentation
> and code are not consistent at patch 08/10, so we need some way of
> correcting that.  I don't know whether that means splitting the code
> differently in patches 8 & 10, or splitting the documentation
> differently or something else.  Thoughts?

Yes, I will take a whole new stab at the documentation changes as a whole since a lot of things have changed in the code since v1. This potentially means a larger rewrite so it will likely take a few days days until I am happy enough with it.

> Anyway, nicely done overall, this is nearly ready to merge; it just
> needs a few small touch-ups.

Thanks, happy to hear that! Kristofer

Previous: Elijah NewrenNext: Kristofer Karlsson via GitGitGadget
Message 159 of 176 in “commit-reach: terminate merge-base walk when one side is exhausted”
  1. 0/6 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Jun 20, 2026
  2. 1/6 commit-reach: decouple ahead_behind from nonstale_queueKristofer Karlsson via GitGitGadget, Jun 20, 2026
  3. Derrick StoleeJun 22, 2026
  4. Kristofer KarlssonJun 22, 2026
  5. 2/6 commit-reach: introduce struct paint_queue with per-side countersKristofer Karlsson via GitGitGadget, Jun 20, 2026
  6. Derrick StoleeJun 22, 2026
  7. Kristofer KarlssonJun 22, 2026
  8. Derrick StoleeJun 22, 2026
  9. Kristofer KarlssonJun 23, 2026
  10. Derrick StoleeJun 23, 2026
  11. Kristofer KarlssonJun 23, 2026
  12. Derrick StoleeJun 23, 2026
  13. Kristofer KarlssonJun 24, 2026
  14. 3/6 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Jun 20, 2026
  15. Derrick StoleeJun 22, 2026
  16. Kristofer KarlssonJun 22, 2026
  17. Derrick StoleeJun 22, 2026
  18. Kristofer KarlssonJun 22, 2026
  19. Derrick StoleeJun 23, 2026
  20. 4/6 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Jun 20, 2026
  21. Derrick StoleeJun 22, 2026
  22. Kristofer KarlssonJun 22, 2026
  23. Derrick StoleeJun 22, 2026
  24. 5/6 t6099, t6600: add side-exhaustion regression testsKristofer Karlsson via GitGitGadget, Jun 20, 2026
  25. Derrick StoleeJun 22, 2026
  26. 6/6 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Jun 20, 2026
  27. Derrick StoleeJun 22, 2026
  28. Kristofer KarlssonJun 22, 2026
  29. Derrick StoleeJun 22, 2026
  30. 0/7 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Jun 24, 2026
  31. 1/7 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Jun 24, 2026
  32. Junio C HamanoJun 24, 2026
  33. 2/7 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Jun 24, 2026
  34. Derrick StoleeJun 24, 2026
  35. Kristofer KarlssonJun 24, 2026
  36. 3/7 t6099, t6600: add side-exhaustion regression testsKristofer Karlsson via GitGitGadget, Jun 24, 2026
  37. 4/7 commit-reach: add trace2 instrumentation to paint_down_to_common()Kristofer Karlsson via GitGitGadget, Jun 24, 2026
  38. Derrick StoleeJun 24, 2026
  39. Kristofer KarlssonJun 24, 2026
  40. 5/7 commit-reach: introduce struct paint_state with per-side countersKristofer Karlsson via GitGitGadget, Jun 24, 2026
  41. Derrick StoleeJun 24, 2026
  42. Kristofer KarlssonJun 24, 2026
  43. 6/7 commit-reach: remove unused nonstale_queue dedup wrappersKristofer Karlsson via GitGitGadget, Jun 24, 2026
  44. Derrick StoleeJun 24, 2026
  45. 7/7 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Jun 24, 2026
  46. Derrick StoleeJun 24, 2026
  47. Kristofer KarlssonJun 24, 2026
  48. Derrick StoleeJun 24, 2026
  49. Derrick StoleeJun 24, 2026
  50. Kristofer KarlssonJun 24, 2026
  51. Derrick StoleeJun 24, 2026
  52. 0/8 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Jun 26, 2026
  53. 1/8 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Jun 26, 2026
  54. 2/8 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Jun 26, 2026
  55. 3/8 t6099, t6600: add side-exhaustion regression testsKristofer Karlsson via GitGitGadget, Jun 26, 2026
  56. 4/8 commit-reach: add trace2 instrumentation to paint_down_to_common()Kristofer Karlsson via GitGitGadget, Jun 26, 2026
  57. Derrick StoleeJun 26, 2026
  58. Kristofer KarlssonJun 26, 2026
  59. 5/8 commit-reach: introduce struct paint_state with per-side countersKristofer Karlsson via GitGitGadget, Jun 26, 2026
  60. René ScharfeJun 26, 2026
  61. Kristofer KarlssonJun 26, 2026
  62. 6/8 commit-reach: remove unused nonstale_queue dedup wrappersKristofer Karlsson via GitGitGadget, Jun 26, 2026
  63. 7/8 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Jun 26, 2026
  64. Kristofer KarlssonJun 26, 2026
  65. Derrick StoleeJun 26, 2026
  66. Kristofer KarlssonJun 26, 2026
  67. Derrick StoleeJun 26, 2026
  68. Kristofer KarlssonJun 26, 2026
  69. 8/8 commit-reach: move min_generation check into paint_queue_get()Kristofer Karlsson via GitGitGadget, Jun 26, 2026
  70. Derrick StoleeJun 26, 2026
  71. Kristofer KarlssonJun 26, 2026
  72. Derrick StoleeJun 26, 2026
  73. Junio C HamanoJun 26, 2026
  74. Kristofer KarlssonJun 26, 2026
  75. Junio C HamanoJun 26, 2026
  76. 0/8 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Jun 28, 2026
  77. 1/8 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Jun 28, 2026
  78. 2/8 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Jun 28, 2026
  79. 3/8 t6099, t6600: add side-exhaustion regression testsKristofer Karlsson via GitGitGadget, Jun 28, 2026
  80. 4/8 commit-reach: add trace2 instrumentation to paint_down_to_common()Kristofer Karlsson via GitGitGadget, Jun 28, 2026
  81. 5/8 commit-reach: introduce struct paint_state with per-side countersKristofer Karlsson via GitGitGadget, Jun 28, 2026
  82. 6/8 commit-reach: remove unused nonstale_queue dedup wrappersKristofer Karlsson via GitGitGadget, Jun 28, 2026
  83. SZEDER GáborJun 29, 2026
  84. Kristofer KarlssonJun 29, 2026
  85. 7/8 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Jun 28, 2026
  86. 8/8 commit-reach: move min_generation check into paint_queue_get()Kristofer Karlsson via GitGitGadget, Jun 28, 2026
  87. Derrick StoleeJun 28, 2026
  88. Derrick StoleeJun 28, 2026
  89. Kristofer KarlssonJun 29, 2026
  90. Derrick StoleeJun 29, 2026
  91. Kristofer KarlssonJun 29, 2026
  92. 00/10 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Jul 1, 2026
  93. 01/10 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Jul 1, 2026
  94. 02/10 test-lib-functions: improve diagnostic output for trace2 data assertionsKristofer Karlsson via GitGitGadget, Jul 1, 2026
  95. 03/10 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Jul 1, 2026
  96. 04/10 t6099, t6600: add side-exhaustion regression testsKristofer Karlsson via GitGitGadget, Jul 1, 2026
  97. 05/10 commit-reach: add trace2 instrumentation to paint_down_to_common()Kristofer Karlsson via GitGitGadget, Jul 1, 2026
  98. 06/10 t6600: add clock-skew topologies and step counts for edge casesKristofer Karlsson via GitGitGadget, Jul 1, 2026
  99. 07/10 commit-reach: introduce struct paint_state with per-side countersKristofer Karlsson via GitGitGadget, Jul 1, 2026
  100. 08/10 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Jul 1, 2026
  101. 09/10 commit-reach: move min_generation check into paint_queue_get()Kristofer Karlsson via GitGitGadget, Jul 1, 2026
  102. 10/10 commit-reach: remove commit-date ordering fallbackKristofer Karlsson via GitGitGadget, Jul 1, 2026
  103. Junio C HamanoJul 1, 2026
  104. Kristofer KarlssonJul 1, 2026
  105. Junio C HamanoJul 3, 2026
  106. 00/10 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Jul 11, 2026
  107. 01/10 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Jul 11, 2026
  108. Elijah NewrenJul 26, 2026
  109. Kristofer KarlssonJul 26, 2026
  110. 02/10 test-lib-functions: improve diagnostic output for trace2 data assertionsKristofer Karlsson via GitGitGadget, Jul 11, 2026
  111. René ScharfeJul 25, 2026
  112. Kristofer KarlssonJul 26, 2026
  113. 03/10 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Jul 11, 2026
  114. 04/10 t6099, t6600: add side-exhaustion regression testsKristofer Karlsson via GitGitGadget, Jul 11, 2026
  115. 05/10 commit-reach: add trace2 instrumentation to paint_down_to_common()Kristofer Karlsson via GitGitGadget, Jul 11, 2026
  116. 06/10 t6600: add clock-skew topologies and step counts for edge casesKristofer Karlsson via GitGitGadget, Jul 11, 2026
  117. 07/10 commit-reach: introduce struct paint_state with per-side countersKristofer Karlsson via GitGitGadget, Jul 11, 2026
  118. 08/10 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Jul 11, 2026
  119. 09/10 commit-reach: move min_generation check into paint_queue_get()Kristofer Karlsson via GitGitGadget, Jul 11, 2026
  120. 10/10 commit-reach: remove commit-date ordering fallbackKristofer Karlsson via GitGitGadget, Jul 11, 2026
  121. Junio C HamanoJul 11, 2026
  122. Kristofer KarlssonJul 11, 2026
  123. Junio C HamanoJul 19, 2026
  124. Kristofer KarlssonJul 21, 2026
  125. Elijah NewrenJul 26, 2026
  126. 00/10 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Aug 6, 2026
  127. 01/10 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Aug 6, 2026
  128. Elijah NewrenAug 7, 2026
  129. 02/10 test-lib-functions: improve diagnostic output for trace2 data assertionsKristofer Karlsson via GitGitGadget, Aug 6, 2026
  130. Elijah NewrenAug 7, 2026
  131. 03/10 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Aug 6, 2026
  132. Elijah NewrenAug 7, 2026
  133. Kristofer KarlssonAug 7, 2026
  134. Elijah NewrenAug 7, 2026
  135. 04/10 t6099, t6600: add side-exhaustion regression testsKristofer Karlsson via GitGitGadget, Aug 6, 2026
  136. Junio C HamanoAug 6, 2026
  137. Kristofer KarlssonAug 6, 2026
  138. Junio C HamanoAug 6, 2026
  139. Elijah NewrenAug 7, 2026
  140. Kristofer KarlssonAug 7, 2026
  141. 05/10 commit-reach: add trace2 instrumentation to paint_down_to_common()Kristofer Karlsson via GitGitGadget, Aug 6, 2026
  142. Elijah NewrenAug 7, 2026
  143. Kristofer KarlssonAug 7, 2026
  144. Elijah NewrenAug 7, 2026
  145. Kristofer KarlssonAug 7, 2026
  146. 06/10 t6600: add clock-skew topologies and step counts for edge casesKristofer Karlsson via GitGitGadget, Aug 6, 2026
  147. Elijah NewrenAug 7, 2026
  148. 07/10 commit-reach: introduce struct paint_state with per-side countersKristofer Karlsson via GitGitGadget, Aug 6, 2026
  149. Elijah NewrenAug 7, 2026
  150. Kristofer KarlssonAug 7, 2026
  151. Elijah NewrenAug 7, 2026
  152. Kristofer KarlssonAug 7, 2026
  153. 08/10 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Aug 6, 2026
  154. Elijah NewrenAug 7, 2026
  155. Kristofer KarlssonAug 7, 2026
  156. 09/10 commit-reach: move min_generation check into paint_queue_get()Kristofer Karlsson via GitGitGadget, Aug 6, 2026
  157. 10/10 commit-reach: remove commit-date ordering fallbackKristofer Karlsson via GitGitGadget, Aug 6, 2026
  158. Elijah NewrenAug 7, 2026
  159. Kristofer KarlssonAug 7, 2026
  160. 00/10 commit-reach: terminate merge-base walk when one side is exhaustedKristofer Karlsson via GitGitGadget, Aug 11, 2026
  161. 01/10 Documentation/technical: add paint-down-to-common docKristofer Karlsson via GitGitGadget, Aug 11, 2026
  162. 02/10 test-lib-functions: improve diagnostic output for trace2 data assertionsKristofer Karlsson via GitGitGadget, Aug 11, 2026
  163. 03/10 t6600: add test cases for side-exhaustion edge casesElijah Newren via GitGitGadget, Aug 11, 2026
  164. 04/10 t6099: add side-exhaustion regression testKristofer Karlsson via GitGitGadget, Aug 11, 2026
  165. 05/10 commit-reach: add trace2 instrumentation to paint_down_to_common()Kristofer Karlsson via GitGitGadget, Aug 11, 2026
  166. 06/10 t6600: add clock-skew topologies and step counts for edge casesKristofer Karlsson via GitGitGadget, Aug 11, 2026
  167. 07/10 commit-reach: introduce struct paint_state with per-side countersKristofer Karlsson via GitGitGadget, Aug 11, 2026
  168. 08/10 commit-reach: terminate merge-base walk when one paint side is exhaustedKristofer Karlsson via GitGitGadget, Aug 11, 2026
  169. 09/10 commit-reach: move min_generation check into paint_queue_get()Kristofer Karlsson via GitGitGadget, Aug 11, 2026
  170. 10/10 commit-reach: remove commit-date ordering fallbackKristofer Karlsson via GitGitGadget, Aug 11, 2026
  171. Elijah NewrenAug 12, 2026
  172. Kristofer KarlssonAug 12, 2026
  173. Junio C HamanoAug 12, 2026
  174. Kristofer KarlssonAug 12, 2026
  175. Elijah NewrenAug 12, 2026
  176. Junio C HamanoAug 12, 2026

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.