From: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> The only caller of refs_resolve_ref_unsafe_with_errno() is in refs/files-backend.c, and it only cares about EISDIR and ENOTDIR. Signed-off-by: Han-Wen Nienhuys <hanwen@xxxxxxxxxx> --- refs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/refs.c b/refs.c index 6e746cb01f24..597e4d1f18f9 100644 --- a/refs.c +++ b/refs.c @@ -1706,7 +1706,6 @@ static const char *refs_resolve_ref_unsafe_errno(struct ref_store *refs, if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) { if (!(resolve_flags & RESOLVE_REF_ALLOW_BAD_NAME) || !refname_is_safe(refname)) { - errno = EINVAL; return NULL; } @@ -1766,7 +1765,6 @@ static const char *refs_resolve_ref_unsafe_errno(struct ref_store *refs, if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) { if (!(resolve_flags & RESOLVE_REF_ALLOW_BAD_NAME) || !refname_is_safe(refname)) { - errno = EINVAL; return NULL; } @@ -1774,7 +1772,6 @@ static const char *refs_resolve_ref_unsafe_errno(struct ref_store *refs, } } - errno = ELOOP; return NULL; } -- gitgitgadget