]> git.ipfire.org Git - thirdparty/git.git/commit
refs: standardize output of refs_read_symbolic_ref
authorBence Ferdinandy <bence@ferdinandy.com>
Fri, 22 Nov 2024 12:28:44 +0000 (13:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Nov 2024 02:46:35 +0000 (11:46 +0900)
commit8102d10ff8317c1e0ba5afb3a41b6a2bc523ff97
tree9bbd2ef07f0b60889172b6147f09dec77a96749c
parent2fd55558950bdfe43fd28ca17b50691427842c35
refs: standardize output of refs_read_symbolic_ref

When the symbolic reference we want to read with refs_read_symbolic_ref
is actually not a symbolic reference, the files and the reftable
backends return different values (1 and -1 respectively). Standardize
the returned values so that 0 is success, -1 is a generic error and -2
is that the reference was actually non-symbolic.

Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.h
refs/files-backend.c
refs/refs-internal.h
refs/reftable-backend.c