1
0
mirror of https://github.com/git/git.git synced 2024-10-21 05:48:38 +02:00
git/refs
Ævar Arnfjörð Bjarmason 48cdcd9ca0 refs/files: remove unused "errno != ENOTDIR" condition
As a follow-up to the preceding commit where we removed the adjacent
"errno == EISDIR" condition in the same function, remove the
"last_errno != ENOTDIR" condition here.

It's not possible for us to hit this condition added in
5b2d8d6f218 (lock_ref_sha1_basic(): improve diagnostics for ref D/F
conflicts, 2015-05-11). Since a1c1d8170db (refs_resolve_ref_unsafe:
handle d/f conflicts for writes, 2017-10-06) we've explicitly caught
these in refs_resolve_ref_unsafe() before returning NULL:

	if (errno != ENOENT &&
	    errno != EISDIR &&
	    errno != ENOTDIR)
		return NULL;

We'd then always return the refname from refs_resolve_ref_unsafe()
even if we were in a broken state as explained in the preceding
commit. The elided context here is a call to refs_resolve_ref_unsafe().

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-08-25 13:27:37 -07:00
..
debug.c refs API: remove OID argument to reflog_expire() 2021-08-25 13:27:37 -07:00
files-backend.c refs/files: remove unused "errno != ENOTDIR" condition 2021-08-25 13:27:37 -07:00
iterator.c use CALLOC_ARRAY 2021-03-13 16:00:09 -08:00
packed-backend.c refs API: remove OID argument to reflog_expire() 2021-08-25 13:27:37 -07:00
packed-backend.h
ref-cache.c refs: make explicit that ref_iterator_peel returns boolean 2021-05-20 07:54:12 +09:00
ref-cache.h
refs-internal.h refs API: remove OID argument to reflog_expire() 2021-08-25 13:27:37 -07:00