summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-23 04:41:49 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-09-23 04:41:49 (GMT)
commit5fd6f5cffc7b8bc679c922b8ff0b1cd35bb1a30c (patch)
tree76076d87a2a18863d72ed506205b6ba3d5f82ec1 /refs.c
parent6d15987c1e06dab2c0470b86cf9f3df747891f5a (diff)
downloadgit-5fd6f5cffc7b8bc679c922b8ff0b1cd35bb1a30c.zip
git-5fd6f5cffc7b8bc679c922b8ff0b1cd35bb1a30c.tar.gz
git-5fd6f5cffc7b8bc679c922b8ff0b1cd35bb1a30c.tar.bz2
lock_ref_sha1_basic: remove unused parameter "plen".
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/refs.c b/refs.c
index 5fdf9c4..2cef2b4 100644
--- a/refs.c
+++ b/refs.c
@@ -447,9 +447,7 @@ static struct ref_lock *verify_lock(struct ref_lock *lock,
return lock;
}
-static struct ref_lock *lock_ref_sha1_basic(const char *ref,
- int plen,
- const unsigned char *old_sha1, int mustexist)
+static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char *old_sha1, int mustexist)
{
char *ref_file;
const char *orig_ref = ref;
@@ -489,14 +487,13 @@ struct ref_lock *lock_ref_sha1(const char *ref,
if (check_ref_format(ref))
return NULL;
strcpy(refpath, mkpath("refs/%s", ref));
- return lock_ref_sha1_basic(refpath, strlen(refpath),
- old_sha1, mustexist);
+ return lock_ref_sha1_basic(refpath, old_sha1, mustexist);
}
struct ref_lock *lock_any_ref_for_update(const char *ref,
const unsigned char *old_sha1, int mustexist)
{
- return lock_ref_sha1_basic(ref, strlen(ref), old_sha1, mustexist);
+ return lock_ref_sha1_basic(ref, old_sha1, mustexist);
}
void unlock_ref(struct ref_lock *lock)