fetch: report errors when backfilling tags fails
commit62091b4c87a199c172556f15c5662c6c3679e9cd
authorPatrick Steinhardt <ps@pks.im>
Thu, 17 Feb 2022 13:04:28 +0000 (17 14:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Feb 2022 19:19:44 +0000 (17 11:19 -0800)
tree8c6d21d3f7138726015b2ccdf4aade74313e4c95
parent2983cec0f26b7409ccc2dd5710b40ff4809cd4b1
fetch: report errors when backfilling tags fails

When the backfilling of tags fails we do not report this error to the
caller, but only report it implicitly at a later point when reporting
updated references. This leaves callers unable to act upon the
information of whether the backfilling succeeded or not.

Refactor the function to return an error code and pass it up the
callstack. This causes us to correctly propagate the error back to the
user of git-fetch(1).

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
t/t5503-tagfollow.sh