}
/* backend functions */
+int pack_refs(unsigned int flags)
+{
+ struct ref_store *refs = get_ref_store(NULL);
+
+ return refs->be->pack_refs(refs, flags);
+}
+
int ref_transaction_commit(struct ref_transaction *transaction,
struct strbuf *err)
{
}
}
-int pack_refs(unsigned int flags)
+static int files_pack_refs(struct ref_store *ref_store, unsigned int flags)
{
struct files_ref_store *refs =
- get_files_ref_store(NULL, "pack_refs");
+ files_downcast(ref_store, 0, "pack_refs");
struct pack_refs_cb_data cbdata;
memset(&cbdata, 0, sizeof(cbdata));
files_ref_store_create,
files_transaction_commit,
+ files_pack_refs,
+
files_read_raw_ref,
files_verify_refname_available
};
struct ref_transaction *transaction,
struct strbuf *err);
+typedef int pack_refs_fn(struct ref_store *ref_store, unsigned int flags);
+
/*
* Read a reference from the specified reference store, non-recursively.
* Set type to describe the reference, and:
ref_store_init_fn *init;
ref_transaction_commit_fn *transaction_commit;
+ pack_refs_fn *pack_refs;
+
read_raw_ref_fn *read_raw_ref;
verify_refname_available_fn *verify_refname_available;
};