lock_ref_sha1_basic: remove unused parameter "plen".

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 2006-09-22 21:41:49 -07:00
parent 6d15987c1e
commit 5fd6f5cffc
1 changed files with 3 additions and 6 deletions

9
refs.c
View File

@ -447,9 +447,7 @@ static struct ref_lock *verify_lock(struct ref_lock *lock,
return lock; return lock;
} }


static struct ref_lock *lock_ref_sha1_basic(const char *ref, static struct ref_lock *lock_ref_sha1_basic(const char *ref, const unsigned char *old_sha1, int mustexist)
int plen,
const unsigned char *old_sha1, int mustexist)
{ {
char *ref_file; char *ref_file;
const char *orig_ref = ref; const char *orig_ref = ref;
@ -489,14 +487,13 @@ struct ref_lock *lock_ref_sha1(const char *ref,
if (check_ref_format(ref)) if (check_ref_format(ref))
return NULL; return NULL;
strcpy(refpath, mkpath("refs/%s", ref)); strcpy(refpath, mkpath("refs/%s", ref));
return lock_ref_sha1_basic(refpath, strlen(refpath), return lock_ref_sha1_basic(refpath, old_sha1, mustexist);
old_sha1, mustexist);
} }


struct ref_lock *lock_any_ref_for_update(const char *ref, struct ref_lock *lock_any_ref_for_update(const char *ref,
const unsigned char *old_sha1, int mustexist) 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) void unlock_ref(struct ref_lock *lock)