mirror of
https://github.com/git/git.git
synced 2024-11-27 20:14:30 +08:00
refs: remove delete_refs
callback from backends
Now that `refs_delete_refs` is implemented in a generic way via the ref transaction interfaces there are no callers left that invoke the `delete_refs` callback anymore. Remove it from all of our backends. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d6f8e72982
commit
29a186917b
15
refs/debug.c
15
refs/debug.c
@ -143,20 +143,6 @@ static int debug_create_symref(struct ref_store *ref_store,
|
||||
return res;
|
||||
}
|
||||
|
||||
static int debug_delete_refs(struct ref_store *ref_store, const char *msg,
|
||||
struct string_list *refnames, unsigned int flags)
|
||||
{
|
||||
struct debug_ref_store *drefs = (struct debug_ref_store *)ref_store;
|
||||
int res =
|
||||
drefs->refs->be->delete_refs(drefs->refs, msg, refnames, flags);
|
||||
int i;
|
||||
trace_printf_key(&trace_refs, "delete_refs {\n");
|
||||
for (i = 0; i < refnames->nr; i++)
|
||||
trace_printf_key(&trace_refs, "%s\n", refnames->items[i].string);
|
||||
trace_printf_key(&trace_refs, "}: %d\n", res);
|
||||
return res;
|
||||
}
|
||||
|
||||
static int debug_rename_ref(struct ref_store *ref_store, const char *oldref,
|
||||
const char *newref, const char *logmsg)
|
||||
{
|
||||
@ -458,7 +444,6 @@ struct ref_storage_be refs_be_debug = {
|
||||
|
||||
.pack_refs = debug_pack_refs,
|
||||
.create_symref = debug_create_symref,
|
||||
.delete_refs = debug_delete_refs,
|
||||
.rename_ref = debug_rename_ref,
|
||||
.copy_ref = debug_copy_ref,
|
||||
|
||||
|
@ -1265,12 +1265,6 @@ static int files_pack_refs(struct ref_store *ref_store,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int files_delete_refs(struct ref_store *ref_store, const char *msg,
|
||||
struct string_list *refnames, unsigned int flags)
|
||||
{
|
||||
return refs_delete_refs(ref_store, msg, refnames, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* People using contrib's git-new-workdir have .git/logs/refs ->
|
||||
* /some/other/path/.git/logs/refs, and that may live on another device.
|
||||
@ -3258,7 +3252,6 @@ struct ref_storage_be refs_be_files = {
|
||||
|
||||
.pack_refs = files_pack_refs,
|
||||
.create_symref = files_create_symref,
|
||||
.delete_refs = files_delete_refs,
|
||||
.rename_ref = files_rename_ref,
|
||||
.copy_ref = files_copy_ref,
|
||||
|
||||
|
@ -1688,12 +1688,6 @@ static int packed_initial_transaction_commit(struct ref_store *ref_store UNUSED,
|
||||
return ref_transaction_commit(transaction, err);
|
||||
}
|
||||
|
||||
static int packed_delete_refs(struct ref_store *ref_store, const char *msg,
|
||||
struct string_list *refnames, unsigned int flags)
|
||||
{
|
||||
return refs_delete_refs(ref_store, msg, refnames, flags);
|
||||
}
|
||||
|
||||
static int packed_pack_refs(struct ref_store *ref_store UNUSED,
|
||||
struct pack_refs_opts *pack_opts UNUSED)
|
||||
{
|
||||
@ -1722,7 +1716,6 @@ struct ref_storage_be refs_be_packed = {
|
||||
|
||||
.pack_refs = packed_pack_refs,
|
||||
.create_symref = NULL,
|
||||
.delete_refs = packed_delete_refs,
|
||||
.rename_ref = NULL,
|
||||
.copy_ref = NULL,
|
||||
|
||||
|
@ -553,8 +553,6 @@ typedef int create_symref_fn(struct ref_store *ref_store,
|
||||
const char *ref_target,
|
||||
const char *refs_heads_master,
|
||||
const char *logmsg);
|
||||
typedef int delete_refs_fn(struct ref_store *ref_store, const char *msg,
|
||||
struct string_list *refnames, unsigned int flags);
|
||||
typedef int rename_ref_fn(struct ref_store *ref_store,
|
||||
const char *oldref, const char *newref,
|
||||
const char *logmsg);
|
||||
@ -677,7 +675,6 @@ struct ref_storage_be {
|
||||
|
||||
pack_refs_fn *pack_refs;
|
||||
create_symref_fn *create_symref;
|
||||
delete_refs_fn *delete_refs;
|
||||
rename_ref_fn *rename_ref;
|
||||
copy_ref_fn *copy_ref;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user