diff options
author | Jeff King <peff@peff.net> | 2024-08-17 09:26:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-17 18:44:40 +0200 |
commit | 65e7a4478c202734b604662bad739adedeb6dfca (patch) | |
tree | 50358703e54a66ae1b164af40be3fa8b8d99e80a /refs/files-backend.c | |
parent | Sync with 'maint' (diff) | |
download | git-65e7a4478c202734b604662bad739adedeb6dfca.tar.xz git-65e7a4478c202734b604662bad739adedeb6dfca.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | refs/files-backend.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 8d6ec9458d..1cff65f6ae 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -1961,9 +1961,8 @@ static int create_ref_symlink(struct ref_lock *lock, const char *target) return ret; } -static int create_symref_lock(struct files_ref_store *refs, - struct ref_lock *lock, const char *refname, - const char *target, struct strbuf *err) +static int create_symref_lock(struct ref_lock *lock, const char *target, + struct strbuf *err) { if (!fdopen_lock_file(&lock->lk, "w")) { 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 (create_symref_lock(refs, lock, update->refname, - update->new_target, err)) { + if (create_symref_lock(lock, update->new_target, err)) { ret = TRANSACTION_GENERIC_ERROR; goto out; } |