upload-pack: propagate return value from object filter config callback

If we encounter an error in parse_filter_object_config(), we'll complain
to stderr but won't actually propagate the return value up the stack.
This is unlike most of our config callbacks, which return the error to
git_config() so it can die (this includes the call just below us to
parse_hide_refs_config(), which can also produce errors).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2020-12-03 03:09:42 -05:00
committed by Junio C Hamano
parent 898f80736c
commit d43a21bdbb
2 changed files with 10 additions and 1 deletions

View File

@ -1307,7 +1307,8 @@ static int upload_pack_config(const char *var, const char *value, void *cb_data)
return git_config_string(&data->pack_objects_hook, var, value);
}
parse_object_filter_config(var, value, data);
if (parse_object_filter_config(var, value, data) < 0)
return -1;
return parse_hide_refs_config(var, value, "uploadpack");
}