refs: remove create_symref and associated dead code

In the previous commits, we converted `refs_create_symref()` to utilize
transactions to perform symref updates. Earlier `refs_create_symref()`
used `create_symref()` to do the same.

We can now remove `create_symref()` and any code associated with it
which is no longer used. We remove `create_symref()` code from all the
reference backends and also remove it entirely from the `ref_storage_be`
struct.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Karthik Nayak
2024-05-07 14:58:59 +02:00
committed by Junio C Hamano
parent f151dfe3c9
commit 4865707bda
5 changed files with 0 additions and 172 deletions

View File

@ -131,18 +131,6 @@ static int debug_pack_refs(struct ref_store *ref_store, struct pack_refs_opts *o
return res;
}
static int debug_create_symref(struct ref_store *ref_store,
const char *ref_name, const char *target,
const char *logmsg)
{
struct debug_ref_store *drefs = (struct debug_ref_store *)ref_store;
int res = drefs->refs->be->create_symref(drefs->refs, ref_name, target,
logmsg);
trace_printf_key(&trace_refs, "create_symref: %s -> %s \"%s\": %d\n", ref_name,
target, logmsg, res);
return res;
}
static int debug_rename_ref(struct ref_store *ref_store, const char *oldref,
const char *newref, const char *logmsg)
{
@ -441,7 +429,6 @@ struct ref_storage_be refs_be_debug = {
.initial_transaction_commit = debug_initial_transaction_commit,
.pack_refs = debug_pack_refs,
.create_symref = debug_create_symref,
.rename_ref = debug_rename_ref,
.copy_ref = debug_copy_ref,