# [PATCH] refs: drop unused `peel_iterated_oid()` declaration

3 messages from 2026-11-12 to 2026-11-13. Participants: Yusuke Hayashi via B4 Relay, Junio C Hamano, Patrick Steinhardt.
Thread: https://gitlist.dev/t/66829

## Yusuke Hayashi via B4 Relay, 2026-11-12 05:57

Subject: [PATCH] refs: drop unused `peel_iterated_oid()` declaration
Message-ID: <20261112-refs-drop-peel-iterated-oid-v1-1-7df1c313e293@gmail.com>
URL: https://gitlist.dev/e/20261112-refs-drop-peel-iterated-oid-v1-1-7df1c313e293%40gmail.com

```
From: Yusuke Hayashi <yusuke8h@gmail.com>

Commit 5a5c7359f7 (refs: drop `current_ref_iter` hack, 2025-10-23)
removed `peel_iterated_oid()` from "refs.c" after converting all of its
callers to `reference_get_peeled_oid()`, leaving behind the declaration
in "refs.h".

Remove the unused declaration and its comment.

Signed-off-by: Yusuke Hayashi <yusuke8h@gmail.com>
---
 refs.h | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/refs.h b/refs.h
index ee3b8a62ef..73076cba2f 100644
--- a/refs.h
+++ b/refs.h
@@ -178,19 +178,6 @@ void ref_store_release(struct ref_store *ref_store);
  */
 int ref_store_remove_on_disk(struct ref_store *refs, struct strbuf *err);
 
-/*
- * Return the peeled value of the oid currently being iterated via
- * for_each_ref(), etc. This is equivalent to calling:
- *
- *   peel_object(r, oid, &peeled);
- *
- * with the "oid" value given to the refs_for_each_cb callback, except
- * that some ref storage may be able to answer the query without
- * actually loading the object in memory.
- */
-int peel_iterated_oid(struct repository *r,
-		      const struct object_id *base, struct object_id *peeled);
-
 /**
  * Resolve refname in the nested "gitlink" repository in the specified
  * submodule (which must be non-NULL). If the resolution is

---
base-commit: 1891de46f79dc444a47db1c87bd0c8c76b5463f2
change-id: 20261112-refs-drop-peel-iterated-oid-ede2901e1c5a




```

## Junio C Hamano, 2026-11-12 18:45

Subject: Re: [PATCH] refs: drop unused `peel_iterated_oid()` declaration
Message-ID: <xmqqv761j3df.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqv761j3df.fsf%40gitster.g
In-Reply-To: <20261112-refs-drop-peel-iterated-oid-v1-1-7df1c313e293@gmail.com>

```
Yusuke Hayashi via B4 Relay <devnull+yusuke8h.gmail.com@kernel.org>
writes:

> From: Yusuke Hayashi <yusuke8h@gmail.com>
>
> Commit 5a5c7359f7 (refs: drop `current_ref_iter` hack, 2025-10-23)
> removed `peel_iterated_oid()` from "refs.c" after converting all of its
> callers to `reference_get_peeled_oid()`, leaving behind the declaration
> in "refs.h".
>
> Remove the unused declaration and its comment.
>
> Signed-off-by: Yusuke Hayashi <yusuke8h@gmail.com>
> ---
>  refs.h | 13 -------------
>  1 file changed, 13 deletions(-)

obviously correct ;-)  Thanks, will queue.

>
> diff --git a/refs.h b/refs.h
> index ee3b8a62ef..73076cba2f 100644
> --- a/refs.h
> +++ b/refs.h
> @@ -178,19 +178,6 @@ void ref_store_release(struct ref_store *ref_store);
>   */
>  int ref_store_remove_on_disk(struct ref_store *refs, struct strbuf *err);
>  
> -/*
> - * Return the peeled value of the oid currently being iterated via
> - * for_each_ref(), etc. This is equivalent to calling:
> - *
> - *   peel_object(r, oid, &peeled);
> - *
> - * with the "oid" value given to the refs_for_each_cb callback, except
> - * that some ref storage may be able to answer the query without
> - * actually loading the object in memory.
> - */
> -int peel_iterated_oid(struct repository *r,
> -		      const struct object_id *base, struct object_id *peeled);
> -
>  /**
>   * Resolve refname in the nested "gitlink" repository in the specified
>   * submodule (which must be non-NULL). If the resolution is
>
> ---
> base-commit: 1891de46f79dc444a47db1c87bd0c8c76b5463f2
> change-id: 20261112-refs-drop-peel-iterated-oid-ede2901e1c5a


```

## Patrick Steinhardt, 2026-11-13 07:04

Subject: Re: [PATCH] refs: drop unused `peel_iterated_oid()` declaration
Message-ID: <ava2ejke3jl7Bv5S@pks.im>
URL: https://gitlist.dev/e/ava2ejke3jl7Bv5S%40pks.im
In-Reply-To: <xmqqv761j3df.fsf@gitster.g>

```
On Thu, Nov 12, 2026 at 10:45:00AM -0800, Junio C Hamano wrote:
> Yusuke Hayashi via B4 Relay <devnull+yusuke8h.gmail.com@kernel.org>
> writes:
> 
> > From: Yusuke Hayashi <yusuke8h@gmail.com>
> >
> > Commit 5a5c7359f7 (refs: drop `current_ref_iter` hack, 2025-10-23)
> > removed `peel_iterated_oid()` from "refs.c" after converting all of its
> > callers to `reference_get_peeled_oid()`, leaving behind the declaration
> > in "refs.h".
> >
> > Remove the unused declaration and its comment.
> >
> > Signed-off-by: Yusuke Hayashi <yusuke8h@gmail.com>
> > ---
> >  refs.h | 13 -------------
> >  1 file changed, 13 deletions(-)
> 
> obviously correct ;-)  Thanks, will queue.

Indeed, thanks for cleaning up after me!

Patrick


```
