repack-geometry: drop unused redundant-pack removal

The previous commit stopped using pack_geometry_remove_redundant() when deleting packs after a geometric repack. The existing_packs machinery now handles the same removal after geometric packs are marked for deletion. Remove the unused geometry-specific helper and its declaration. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Taylor Blau committed Jun 26, 2026 at 15:02 UTC 9dc0bf0e006ef8cf6f49ffafe40295e9803018db
2 files changed -49
repack-geometry.c
-44
@@ -245,50 +245,6 @@ struct packed_git *pack_geometry_preferred_pack(struct pack_geometry *geometry)
245 return NULL;
246 }
247
248 -static void remove_redundant_packs(struct packed_git **pack,
249 - uint32_t pack_nr,
250 - struct string_list *names,
251 - struct existing_packs *existing,
252 - const char *packdir,
253 - bool wrote_incremental_midx)
254 -{
255 - const struct git_hash_algo *algop = existing->repo->hash_algo;
256 - struct strbuf buf = STRBUF_INIT;
257 - uint32_t i;
258 -
259 - for (i = 0; i < pack_nr; i++) {
260 - struct packed_git *p = pack[i];
261 - if (string_list_has_string(names, hash_to_hex_algop(p->hash,
262 - algop)))
263 - continue;
264 -
265 - strbuf_reset(&buf);
266 - strbuf_addstr(&buf, pack_basename(p));
267 - strbuf_strip_suffix(&buf, ".pack");
268 -
269 - if ((p->pack_keep) ||
270 - (string_list_has_string(&existing->kept_packs, buf.buf)))
271 - continue;
272 -
273 - repack_remove_redundant_pack(existing->repo, packdir, buf.buf,
274 - wrote_incremental_midx);
275 - }
276 -
277 - strbuf_release(&buf);
278 -}
279 -
280 -void pack_geometry_remove_redundant(struct pack_geometry *geometry,
281 - struct string_list *names,
282 - struct existing_packs *existing,
283 - const char *packdir,
284 - bool wrote_incremental_midx)
285 -{
286 - remove_redundant_packs(geometry->pack, geometry->split,
287 - names, existing, packdir, wrote_incremental_midx);
288 - remove_redundant_packs(geometry->promisor_pack, geometry->promisor_split,
289 - names, existing, packdir, wrote_incremental_midx);
290 -}
291 -
248 void pack_geometry_release(struct pack_geometry *geometry)
249 {
250 if (!geometry)
repack.h
-5
@@ -134,11 +134,6 @@ void pack_geometry_init(struct pack_geometry *geometry,
134 const struct pack_objects_args *args);
135 void pack_geometry_split(struct pack_geometry *geometry);
136 struct packed_git *pack_geometry_preferred_pack(struct pack_geometry *geometry);
137 -void pack_geometry_remove_redundant(struct pack_geometry *geometry,
138 - struct string_list *names,
139 - struct existing_packs *existing,
140 - const char *packdir,
141 - bool wrote_incremental_midx);
137 void pack_geometry_release(struct pack_geometry *geometry);
138
139 struct tempfile;