From: Michael Haggerty Date: Mon, 2 Mar 2015 09:29:51 +0000 (+0100) Subject: write_ref_sha1(): remove check for lock == NULL X-Git-Tag: v2.4.0-rc0~51^2~6 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8280bbebd1ecc4633b969a439ed4ca653d1bc958?ds=inline;hp=--cc write_ref_sha1(): remove check for lock == NULL None of the callers pass NULL to this function, and there doesn't seem to be any usefulness to allowing them to do so. Signed-off-by: Michael Haggerty Reviewed-by: Stefan Beller Signed-off-by: Junio C Hamano --- 8280bbebd1ecc4633b969a439ed4ca653d1bc958 diff --git a/refs.c b/refs.c index c5fa70947f..d1130e2259 100644 --- a/refs.c +++ b/refs.c @@ -3080,10 +3080,6 @@ static int write_ref_sha1(struct ref_lock *lock, static char term = '\n'; struct object *o; - if (!lock) { - errno = EINVAL; - return -1; - } if (!lock->force_write && !hashcmp(lock->old_sha1, sha1)) { unlock_ref(lock); return 0;