summaryrefslogtreecommitdiff
path: root/ref-filter.h
diff options
context:
space:
mode:
Diffstat (limited to 'ref-filter.h')
-rw-r--r--ref-filter.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/ref-filter.h b/ref-filter.h
index baf72a7189..6228458d30 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -13,7 +13,6 @@
#define QUOTE_PYTHON 4
#define QUOTE_TCL 8
-#define FILTER_REFS_INCLUDE_BROKEN 0x0001
#define FILTER_REFS_TAGS 0x0002
#define FILTER_REFS_BRANCHES 0x0004
#define FILTER_REFS_REMOTES 0x0008
@@ -38,6 +37,7 @@ struct ref_sorting {
struct ref_array_item {
struct object_id objectname;
+ const char *rest;
int flag;
unsigned int kind;
const char *symref;
@@ -76,14 +76,16 @@ struct ref_format {
* verify_ref_format() afterwards to finalize.
*/
const char *format;
+ const char *rest;
int quote_style;
+ int use_rest;
int use_color;
/* Internal state to ref-filter */
int need_color_reset_at_eol;
};
-#define REF_FORMAT_INIT { NULL, 0, -1 }
+#define REF_FORMAT_INIT { .use_color = -1 }
/* Macros for checking --merged and --no-merged options */
#define _OPT_MERGED_NO_MERGED(option, filter, h) \
@@ -116,7 +118,7 @@ void ref_array_sort(struct ref_sorting *sort, struct ref_array *array);
void ref_sorting_set_sort_flags_all(struct ref_sorting *sorting, unsigned int mask, int on);
/* Based on the given format and quote_style, fill the strbuf */
int format_ref_array_item(struct ref_array_item *info,
- const struct ref_format *format,
+ struct ref_format *format,
struct strbuf *final_buf,
struct strbuf *error_buf);
/* Parse a single sort specifier and add it to the list */
@@ -125,6 +127,8 @@ void parse_ref_sorting(struct ref_sorting **sorting_tail, const char *atom);
int parse_opt_ref_sorting(const struct option *opt, const char *arg, int unset);
/* Default sort option based on refname */
struct ref_sorting *ref_default_sorting(void);
+/* Release a "struct ref_sorting" */
+void ref_sorting_release(struct ref_sorting *);
/* 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 */
@@ -137,7 +141,7 @@ void setup_ref_filter_porcelain_msg(void);
* name must be a fully qualified refname.
*/
void pretty_print_ref(const char *name, const struct object_id *oid,
- const struct ref_format *format);
+ struct ref_format *format);
/*
* Push a single ref onto the array; this can be used to construct your own