Make function global for further using in cat-file. In the end of patch series this function becomes internal again, so this is a part of middle step. cat-file would use more general functions further. Signed-off-by: Olga Telezhnaia <olyatelezhnaya@xxxxxxxxx> Mentored-by: Christian Couder <christian.couder@xxxxxxxxx> Mentored by: Jeff King <peff@xxxxxxxx> --- ref-filter.c | 2 +- ref-filter.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ref-filter.c b/ref-filter.c index 5c75259b1ab8c..4acd391b5dfac 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1407,7 +1407,7 @@ static const char *get_refname(struct used_atom *atom, struct ref_array_item *re * Parse the object referred by ref, and grab needed value. * Return 0 if everything was successful, -1 otherwise. */ -static int populate_value(struct ref_array_item *ref) +int populate_value(struct ref_array_item *ref) { void *buf; struct object *obj; diff --git a/ref-filter.h b/ref-filter.h index 781921d4e0978..e16ea2a990119 100644 --- a/ref-filter.h +++ b/ref-filter.h @@ -182,4 +182,7 @@ void setup_ref_filter_porcelain_msg(void); void pretty_print_ref(const char *name, const unsigned char *sha1, const struct ref_format *format); +/* Fill the values of request and prepare all data for final string creation */ +int populate_value(struct ref_array_item *ref); + #endif /* REF_FILTER_H */ -- https://github.com/git/git/pull/452