refs: explicitly propagate errno from refs_read_raw_ref
authorHan-Wen Nienhuys <hanwen@google.com>
Thu, 10 Jun 2021 12:57:48 +0000 (12:57 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 11 Jun 2021 03:43:42 +0000 (12:43 +0900)
commitc518b1af63a373c3bca14b126cc845793afbacec
tree19d3cc22894bd943b4e6201c4b4deeac244a7b09
parent171ac9052f0089d8a98c980204ba93f57b4a85fc
refs: explicitly propagate errno from refs_read_raw_ref

The function refs_resolve_ref_unsafe_with_errno should produce an errno output.
Rather than taking the value from the errno (which might contain garbage
beforehand), explicitly propagate the failure_errno coming out of
refs_read_raw_ref().

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c