aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-12-12 09:57:01 +0100
committerJunio C Hamano <gitster@pobox.com>2014-12-22 10:13:15 -0800
commit31e07f76a946831265e741333a3d9e0646c793ad (patch)
tree4e246320dc4ca7a2e3b0b1236ab6fbca75455d29 /refs.c
parent0b1e654801e52243b63b57e27b50acdfe7c8f853 (diff)
downloadgit-31e07f76a946831265e741333a3d9e0646c793ad.tar.gz
git-31e07f76a946831265e741333a3d9e0646c793ad.tar.xz
lock_any_ref_for_update(): inline function
Inline the function at its one remaining caller (which is within refs.c) and remove it. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/refs.c b/refs.c
index bf152aab3..55a79429b 100644
--- a/refs.c
+++ b/refs.c
@@ -2346,13 +2346,6 @@ static struct ref_lock *lock_ref_sha1_basic(const char *refname,
return NULL;
}
-struct ref_lock *lock_any_ref_for_update(const char *refname,
- const unsigned char *old_sha1,
- int flags, int *type_p)
-{
- return lock_ref_sha1_basic(refname, old_sha1, NULL, flags, type_p);
-}
-
/*
* Write an entry to the packed-refs file for the specified refname.
* If peeled is non-NULL, write it as the entry's peeled value.
@@ -4007,7 +4000,7 @@ int reflog_expire(const char *refname, const unsigned char *sha1,
* reference itself, plus we might need to update the
* reference if --updateref was specified:
*/
- lock = lock_any_ref_for_update(refname, sha1, 0, NULL);
+ lock = lock_ref_sha1_basic(refname, sha1, NULL, 0, NULL);
if (!lock)
return error("cannot lock ref '%s'", refname);
if (!reflog_exists(refname)) {