зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
507d6aa5bf
Коммит
8280bbebd1
4
refs.c
4
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче