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

Re: [PATCH v4 6/8] commit-reach: remove unused nonstale_queue dedup wrappers

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Jun 29, 2026, 05:25 UTC
Message-ID
<akIBvWT7nIWntCNT@szeder.dev>
In-Reply-To
<4db485b48aae810eeba28ea4feb47401ab352e88.1782649547.git.gitgitgadget@gmail.com>
On Sun, Jun 28, 2026 at 12:25:44PM +0000, Kristofer Karlsson via GitGitGadget wrote:
Show 5 quoted lines
> From: Kristofer Karlsson <krka@spotify.com>
> 
> nonstale_queue_put_dedup() and nonstale_queue_get_dedup() became
> unused after the previous commit. The core nonstale_queue functions
> remain in use by ahead_behind().

Please squash this patch into the previous one. Since the last callers of these static functions went away in that commit, it can't be built with DEVELOPER=1:

  commit-reach.c:91:23: warning: ‘nonstale_queue_get_dedup’ defined but not used [-Wunused-function]
     91 | static struct commit *nonstale_queue_get_dedup(struct nonstale_queue *queue)
        |                       ^~~~~~~~~~~~~~~~~~~~~~~~
  commit-reach.c:82:13: warning: ‘nonstale_queue_put_dedup’ defined but not used [-Wunused-function]
     82 | static void nonstale_queue_put_dedup(struct nonstale_queue *queue,
        |             ^~~~~~~~~~~~~~~~~~~~~~~~
Show 37 quoted lines
> Signed-off-by: Kristofer Karlsson <krka@spotify.com>
> ---
>  commit-reach.c | 18 ------------------
>  1 file changed, 18 deletions(-)
> 
> diff --git a/commit-reach.c b/commit-reach.c
> index 9ae306f60c..176ffd68d0 100644
> --- a/commit-reach.c
> +++ b/commit-reach.c
> @@ -79,24 +79,6 @@ static void clear_nonstale_queue(struct nonstale_queue *queue)
>  	queue->max_nonstale = NULL;
>  }
>  
> -static void nonstale_queue_put_dedup(struct nonstale_queue *queue,
> -				     struct commit *c)
> -{
> -	if (c->object.flags & ENQUEUED)
> -		return;
> -	c->object.flags |= ENQUEUED;
> -	nonstale_queue_put(queue, c);
> -}
> -
> -static struct commit *nonstale_queue_get_dedup(struct nonstale_queue *queue)
> -{
> -	struct commit *commit = nonstale_queue_get(queue);
> -
> -	if (commit)
> -		commit->object.flags &= ~ENQUEUED;
> -	return commit;
> -}
> -
>  /*
>   * Priority queue with per-side commit counters for paint_down_to_common().
>   * Each non-stale queued commit occupies exactly one bucket: PARENT1-only,
> -- 
> gitgitgadget
> 
Previous: Kristofer Karlsson via GitGitGadgetNext: Kristofer Karlsson
Message 83 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.