summaryrefslogtreecommitdiff
path: root/ref-filter.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-04-25 13:28:59 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-04-25 13:28:59 +0900
commitb3d6c48c5fbec88e96799c5463f7fdddaa19e9d5 (patch)
tree50ac07cd92713658d4ba35afcaa86854b751f582 /ref-filter.h
parentMerge branch 'en/doc-typoes' (diff)
parentref-filter: factor ref_array pushing into its own function (diff)
downloadtgif-b3d6c48c5fbec88e96799c5463f7fdddaa19e9d5.tar.xz
Merge branch 'jk/ref-array-push'
API clean-up aournd ref-filter code. * jk/ref-array-push: ref-filter: factor ref_array pushing into its own function ref-filter: make ref_array_item allocation more consistent ref-filter: use "struct object_id" consistently
Diffstat (limited to 'ref-filter.h')
-rw-r--r--ref-filter.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ref-filter.h b/ref-filter.h
index 0d98342b34..76cf87cb6c 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -132,7 +132,15 @@ void setup_ref_filter_porcelain_msg(void);
* Print a single ref, outside of any ref-filter. Note that the
* name must be a fully qualified refname.
*/
-void pretty_print_ref(const char *name, const unsigned char *sha1,
+void pretty_print_ref(const char *name, const struct object_id *oid,
const struct ref_format *format);
+/*
+ * Push a single ref onto the array; this can be used to construct your own
+ * ref_array without using filter_refs().
+ */
+struct ref_array_item *ref_array_push(struct ref_array *array,
+ const char *refname,
+ const struct object_id *oid);
+
#endif /* REF_FILTER_H */