From 15860aa0b29907e1a795ca2f91a2f66de63fcf59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Mon, 21 Feb 2022 10:03:06 +0100 Subject: [PATCH] remote: do store the update_tips callback error value We use `git_error_set_after_callback_function` to determine whether `update_tips` returned an error but do not store its return value making us think it always returns 0. Fix it by adding the common patter of storing it inside the `if` when calling it. --- src/remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote.c b/src/remote.c index 038afc6f5..f6421b9eb 100644 --- a/src/remote.c +++ b/src/remote.c @@ -1852,7 +1852,7 @@ static int update_one_tip( } if (callbacks && callbacks->update_tips != NULL && - callbacks->update_tips(refname.ptr, &old, &head->oid, callbacks->payload) < 0) + (error = callbacks->update_tips(refname.ptr, &old, &head->oid, callbacks->payload)) < 0) git_error_set_after_callback_function(error, "git_remote_fetch"); done: