refs: drop some unused parameters from create_symref_lock()
This function was factored out in 57d0b1e2ea
(files-backend: extract out
`create_symref_lock()`, 2024-05-07), but we never look at the ref_store
or refname parameters. We just need the path, which is already contained
in the lockfile struct.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b9849e4f76
commit
65e7a4478c
@ -1961,9 +1961,8 @@ static int create_ref_symlink(struct ref_lock *lock, const char *target)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int create_symref_lock(struct files_ref_store *refs,
|
static int create_symref_lock(struct ref_lock *lock, const char *target,
|
||||||
struct ref_lock *lock, const char *refname,
|
struct strbuf *err)
|
||||||
const char *target, struct strbuf *err)
|
|
||||||
{
|
{
|
||||||
if (!fdopen_lock_file(&lock->lk, "w")) {
|
if (!fdopen_lock_file(&lock->lk, "w")) {
|
||||||
strbuf_addf(err, "unable to fdopen %s: %s",
|
strbuf_addf(err, "unable to fdopen %s: %s",
|
||||||
@ -2579,8 +2578,7 @@ static int lock_ref_for_update(struct files_ref_store *refs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (update->new_target && !(update->flags & REF_LOG_ONLY)) {
|
if (update->new_target && !(update->flags & REF_LOG_ONLY)) {
|
||||||
if (create_symref_lock(refs, lock, update->refname,
|
if (create_symref_lock(lock, update->new_target, err)) {
|
||||||
update->new_target, err)) {
|
|
||||||
ret = TRANSACTION_GENERIC_ERROR;
|
ret = TRANSACTION_GENERIC_ERROR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user