aboutsummaryrefslogtreecommitdiffstats
path: root/refs/refs-internal.h
diff options
context:
space:
mode:
authorJohn Cai <johncai86@gmail.com>2023-05-12 21:34:41 +0000
committerJunio C Hamano <gitster@pobox.com>2023-05-12 14:54:14 -0700
commit826ae79fca263bc2b70c54fddacb1603c5ebb9c6 (patch)
treef0a65557626ded284ed05b538dc0f886c067eb82 /refs/refs-internal.h
parentdocs: clarify git-pack-refs --all will pack all refs (diff)
downloadgit-826ae79fca263bc2b70c54fddacb1603c5ebb9c6.tar.gz
git-826ae79fca263bc2b70c54fddacb1603c5ebb9c6.zip
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 <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/refs-internal.h')
-rw-r--r--refs/refs-internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index a85d113123..f72b7be894 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -547,7 +547,8 @@ typedef int ref_transaction_commit_fn(struct ref_store *refs,
struct ref_transaction *transaction,
struct strbuf *err);
-typedef int pack_refs_fn(struct ref_store *ref_store, unsigned int flags);
+typedef int pack_refs_fn(struct ref_store *ref_store,
+ struct pack_refs_opts *opts);
typedef int create_symref_fn(struct ref_store *ref_store,
const char *ref_target,
const char *refs_heads_master,