diff options
author | Patrick Steinhardt <ps@pks.im> | 2023-12-14 14:37:02 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-12-14 09:25:26 -0800 |
commit | 668cdc043fe6f6d1fa2bf2b3f3c2375a20819e77 (patch) | |
tree | bb7d9f35543be78997bacb5b1397726c080b5a3f /commit.c | |
parent | 8f61321ccbdea20945a73446f24a6c380cb2c53b (diff) |
refs: propagate errno when reading special refs fails
Some refs in Git are more special than others due to reasons explained
in the next commit. These refs are read via `refs_read_special_head()`,
but this function doesn't behave the same as when we try to read a
normal ref. Most importantly, we do not propagate `failure_errno` in the
case where the reference does not exist, which is behaviour that we rely
on in many parts of Git.
Fix this bug by propagating errno when `strbuf_read_file()` fails.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions