Skip to content

Commit 8280bbe

Browse files
mhaggergitster
authored andcommitted
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 <[email protected]> Reviewed-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 507d6aa commit 8280bbe

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

refs.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,10 +3080,6 @@ static int write_ref_sha1(struct ref_lock *lock,
30803080
static char term = '\n';
30813081
struct object *o;
30823082

3083-
if (!lock) {
3084-
errno = EINVAL;
3085-
return -1;
3086-
}
30873083
if (!lock->force_write && !hashcmp(lock->old_sha1, sha1)) {
30883084
unlock_ref(lock);
30893085
return 0;

0 commit comments

Comments
 (0)