From 826ae79fca263bc2b70c54fddacb1603c5ebb9c6 Mon Sep 17 00:00:00 2001 From: John Cai Date: Fri, 12 May 2023 21:34:41 +0000 Subject: pack-refs: teach --exclude option to exclude refs from being packed At GitLab, we have a system that creates ephemeral internal refs that don't live long before getting deleted. Having an option to exclude certain refs from a packed-refs file allows these internal references to be deleted much more efficiently. Add an --exclude option to the pack-refs builtin, and use the ref exclusions API to exclude certain refs from being packed into the final packed-refs file Signed-off-by: John Cai Signed-off-by: Junio C Hamano --- refs/packed-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'refs/packed-backend.c') diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 34c0c4e20f..87ba5f520e 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -1576,7 +1576,7 @@ static int packed_delete_refs(struct ref_store *ref_store, const char *msg, } static int packed_pack_refs(struct ref_store *ref_store UNUSED, - unsigned int flags UNUSED) + struct pack_refs_opts *pack_opts UNUSED) { /* * Packed refs are already packed. It might be that loose refs -- cgit v1.3