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>
Jeff King committed
Aug 17, 2024 at 03:26 UTC
65e7a4478c202734b604662bad739adedeb6dfca
1 file changed
+3
-5
refs/files-backend.c
+3
-5
@@ -1961,9 +1961,8 @@ static int create_ref_symlink(struct ref_lock *lock, const char *target)
1961
return ret;
1962
}
1963
1964
-static int create_symref_lock(struct files_ref_store *refs,
1965
- struct ref_lock *lock, const char *refname,
1966
- const char *target, struct strbuf *err)
1964
+static int create_symref_lock(struct ref_lock *lock, const char *target,
1965
+ struct strbuf *err)
1966
{
1967
if (!fdopen_lock_file(&lock->lk, "w")) {
1968
strbuf_addf(err, "unable to fdopen %s: %s",
@@ -2579,8 +2578,7 @@ static int lock_ref_for_update(struct files_ref_store *refs,
2578
}
2579
2580
if (update->new_target && !(update->flags & REF_LOG_ONLY)) {
2582
- if (create_symref_lock(refs, lock, update->refname,
2583
- update->new_target, err)) {
2581
+ if (create_symref_lock(lock, update->new_target, err)) {
2582
ret = TRANSACTION_GENERIC_ERROR;
2583
goto out;
2584
}