]> git.ipfire.org Git - thirdparty/git.git/commit - ref-filter.h
ref-filter: start adding strbufs with errors
authorOlga Telezhnaya <olyatelezhnaya@gmail.com>
Thu, 29 Mar 2018 12:49:45 +0000 (12:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Mar 2018 21:24:49 +0000 (14:24 -0700)
commit3019eca918d168d5f0cb773c8853222745e1b37a
treed6acfbf69e41f411174935099d10e01857c3c149
parente2e7a245459391a06a11b70282177135b3fe111c
ref-filter: start adding strbufs with errors

This is a first step in removing die() calls from ref-filter
formatting logic, so that it could be used by other commands
that do not want to die during formatting process.
die() calls related to bugs in code will not be touched in this patch.

Everything would be the same for show_ref_array_item() users.
But, if you want to deal with errors by your own, you could invoke
format_ref_array_item(). It means that you need to print everything
(the result and errors) on your side.

This commit changes signature of format_ref_array_item() by adding
return value and strbuf parameter for errors, and adjusts
its callers. While at it, reduce the scope of the out-variable.

Signed-off-by: Olga Telezhnaia <olyatelezhnaya@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c
ref-filter.c
ref-filter.h