branch: use ref-filter printing APIs
[gitweb.git] / ref-filter.h
index ab76b22de6c32eca6e07abfe6aa70cf6f8c39ab8..44b36eded0f8f0071b5b77353008eaa7c679c468 100644 (file)
@@ -28,7 +28,9 @@ struct atom_value;
 struct ref_sorting {
        struct ref_sorting *next;
        int atom; /* index into used_atom array (internal) */
-       unsigned reverse : 1;
+       unsigned reverse : 1,
+               ignore_case : 1,
+               version : 1;
 };
 
 struct ref_array_item {
@@ -44,6 +46,7 @@ struct ref_array_item {
 struct ref_array {
        int nr, alloc;
        struct ref_array_item **items;
+       struct rev_info *revs;
 };
 
 struct ref_filter {
@@ -58,9 +61,14 @@ struct ref_filter {
        } merge;
        struct commit *merge_commit;
 
-       unsigned int with_commit_tag_algo : 1;
+       unsigned int with_commit_tag_algo : 1,
+               match_as_path : 1,
+               ignore_case : 1,
+               detached : 1;
        unsigned int kind,
                lines;
+       int abbrev,
+               verbose;
 };
 
 struct ref_filter_cbdata {
@@ -92,6 +100,9 @@ int parse_ref_filter_atom(const char *atom, const char *ep);
 int verify_ref_format(const char *format);
 /*  Sort the given ref_array as per the ref_sorting provided */
 void ref_array_sort(struct ref_sorting *sort, struct ref_array *array);
+/*  Based on the given format and quote_style, fill the strbuf */
+void format_ref_array_item(struct ref_array_item *info, const char *format,
+                          int quote_style, struct strbuf *final_buf);
 /*  Print the ref using the given format and quote_style */
 void show_ref_array_item(struct ref_array_item *info, const char *format, int quote_style);
 /*  Callback function for parsing the sort option */
@@ -100,5 +111,9 @@ int parse_opt_ref_sorting(const struct option *opt, const char *arg, int unset);
 struct ref_sorting *ref_default_sorting(void);
 /*  Function to parse --merged and --no-merged options */
 int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset);
+/*  Get the current HEAD's description */
+char *get_head_description(void);
+/*  Set up translated strings in the output. */
+void setup_ref_filter_porcelain_msg(void);
 
 #endif /*  REF_FILTER_H  */