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
>