Re: [PATCH v4 3/3] fetch, remote: retain old OIDs when pruning refs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 23, 2026, 20:03 UTC
- Message-ID
- <xmqq4iffag6k.fsf@gitster.g>
- In-Reply-To
- <6f34853c79625794d2eb364d227660be57d1539b.1790113781.git.maciej.ciemborowicz@gmail.com>
Maciej Ciemborowicz <maciej.ciemborowicz@gmail.com> writes:
Show 15 quoted lines
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index b662216bf..95789edb8 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -1471,22 +1471,29 @@ static int prune_refs(struct display_state *display_state,
> ...
> } else {
> + for (ref = stale_refs; ref; ref = ref->next) {
> + string_list_append(&refnames, ref->name);
> + oid_array_append(&old_oids, &ref->new_oid);
> + }
> result = refs_delete_refs(get_main_ref_store(the_repository),
> "fetch: prune", &refnames,
> - NULL, 0);
> + &old_oids, &failed_refs, 0);Isn't adding a new parameter to refs_delete_refs() needed before this step? The corresponding changes to refs.[ch] was done in [1/3], and the fact that the callsite receives this update to add an extra parameter this late in the series means [1/3] and [2/3] does not even compile, right?
Thanks.