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 <mhagger@alum.mit.edu> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Mar 2, 2015 at 10:29 UTC
8280bbebd1ecc4633b969a439ed4ca653d1bc958
1 file changed
-4
refs.c
-4
@@ -3080,10 +3080,6 @@ static int write_ref_sha1(struct ref_lock *lock,
3080
static char term = '\n';
3081
struct object *o;
3082
3083
- if (!lock) {
3084
- errno = EINVAL;
3085
- return -1;
3086
- }
3083
if (!lock->force_write && !hashcmp(lock->old_sha1, sha1)) {
3084
unlock_ref(lock);
3085
return 0;