@ -226,7 +226,7 @@ static int strbuf_addf_ret(struct strbuf *sb, int ret, const char *fmt, ...)
@@ -226,7 +226,7 @@ static int strbuf_addf_ret(struct strbuf *sb, int ret, const char *fmt, ...)
return ret;
}
static int color_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int color_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *color_value, struct strbuf *err)
{
if (!color_value)
@ -264,7 +264,7 @@ static int refname_atom_parser_internal(struct refname_atom *atom, const char *a
@@ -264,7 +264,7 @@ static int refname_atom_parser_internal(struct refname_atom *atom, const char *a
return 0;
}
static int remote_ref_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int remote_ref_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
struct string_list params = STRING_LIST_INIT_DUP;
@ -311,7 +311,7 @@ static int remote_ref_atom_parser(const struct ref_format *format, struct used_a
@@ -311,7 +311,7 @@ static int remote_ref_atom_parser(const struct ref_format *format, struct used_a
return 0;
}
static int objecttype_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int objecttype_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (arg)
@ -323,7 +323,7 @@ static int objecttype_atom_parser(const struct ref_format *format, struct used_a
@@ -323,7 +323,7 @@ static int objecttype_atom_parser(const struct ref_format *format, struct used_a
return 0;
}
static int objectsize_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int objectsize_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (!arg) {
@ -343,7 +343,7 @@ static int objectsize_atom_parser(const struct ref_format *format, struct used_a
@@ -343,7 +343,7 @@ static int objectsize_atom_parser(const struct ref_format *format, struct used_a
return 0;
}
static int deltabase_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int deltabase_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (arg)
@ -355,7 +355,7 @@ static int deltabase_atom_parser(const struct ref_format *format, struct used_at
@@ -355,7 +355,7 @@ static int deltabase_atom_parser(const struct ref_format *format, struct used_at
return 0;
}
static int body_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int body_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (arg)
@ -364,7 +364,7 @@ static int body_atom_parser(const struct ref_format *format, struct used_atom *a
@@ -364,7 +364,7 @@ static int body_atom_parser(const struct ref_format *format, struct used_atom *a
return 0;
}
static int subject_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int subject_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (!arg)
@ -376,7 +376,7 @@ static int subject_atom_parser(const struct ref_format *format, struct used_atom
@@ -376,7 +376,7 @@ static int subject_atom_parser(const struct ref_format *format, struct used_atom
return 0;
}
static int trailers_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int trailers_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
atom->u.contents.trailer_opts.no_divider = 1;
@ -402,7 +402,7 @@ static int trailers_atom_parser(const struct ref_format *format, struct used_ato
@@ -402,7 +402,7 @@ static int trailers_atom_parser(const struct ref_format *format, struct used_ato
return 0;
}
static int contents_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int contents_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (!arg)
@ -430,7 +430,7 @@ static int contents_atom_parser(const struct ref_format *format, struct used_ato
@@ -430,7 +430,7 @@ static int contents_atom_parser(const struct ref_format *format, struct used_ato
return 0;
}
static int raw_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int raw_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (!arg)
@ -442,7 +442,7 @@ static int raw_atom_parser(const struct ref_format *format, struct used_atom *at
@@ -442,7 +442,7 @@ static int raw_atom_parser(const struct ref_format *format, struct used_atom *at
return 0;
}
static int oid_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int oid_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (!arg)
@ -461,7 +461,7 @@ static int oid_atom_parser(const struct ref_format *format, struct used_atom *at
@@ -461,7 +461,7 @@ static int oid_atom_parser(const struct ref_format *format, struct used_atom *at
return 0;
}
static int person_email_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int person_email_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (!arg)
@ -475,7 +475,7 @@ static int person_email_atom_parser(const struct ref_format *format, struct used
@@ -475,7 +475,7 @@ static int person_email_atom_parser(const struct ref_format *format, struct used
return 0;
}
static int refname_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int refname_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
return refname_atom_parser_internal(&atom->u.refname, arg, atom->name, err);
@ -492,7 +492,7 @@ static align_type parse_align_position(const char *s)
@@ -492,7 +492,7 @@ static align_type parse_align_position(const char *s)
return -1;
}
static int align_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int align_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
struct align *align = &atom->u.align;
@ -544,7 +544,7 @@ static int align_atom_parser(const struct ref_format *format, struct used_atom *
@@ -544,7 +544,7 @@ static int align_atom_parser(const struct ref_format *format, struct used_atom *
return 0;
}
static int if_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int if_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err)
{
if (!arg) {
@ -559,7 +559,7 @@ static int if_atom_parser(const struct ref_format *format, struct used_atom *ato
@@ -559,7 +559,7 @@ static int if_atom_parser(const struct ref_format *format, struct used_atom *ato
return 0;
}
static int head_atom_parser(const struct ref_format *format, struct used_atom *atom,
static int head_atom_parser(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *unused_err)
{
atom->u.head = resolve_refdup("HEAD", RESOLVE_REF_READING, NULL, NULL);
@ -570,7 +570,7 @@ static struct {
@@ -570,7 +570,7 @@ static struct {
const char *name;
info_source source;
cmp_type cmp_type;
int (*parser)(const struct ref_format *format, struct used_atom *atom,
int (*parser)(struct ref_format *format, struct used_atom *atom,
const char *arg, struct strbuf *err);
} valid_atom[] = {
[ATOM_REFNAME] = { "refname", SOURCE_NONE, FIELD_STR, refname_atom_parser },
@ -653,7 +653,7 @@ struct atom_value {
@@ -653,7 +653,7 @@ struct atom_value {
/*
* Used to parse format string and sort specifiers
*/
static int parse_ref_filter_atom(const struct ref_format *format,
static int parse_ref_filter_atom(struct ref_format *format,
const char *atom, const char *ep,
struct strbuf *err)
{
@ -2556,9 +2556,9 @@ static void append_literal(const char *cp, const char *ep, struct ref_formatting
@@ -2556,9 +2556,9 @@ static void append_literal(const char *cp, const char *ep, struct ref_formatting
}
int format_ref_array_item(struct ref_array_item *info,
const struct ref_format *format,
struct strbuf *final_buf,
struct strbuf *error_buf)
struct ref_format *format,
struct strbuf *final_buf,
struct strbuf *error_buf)
{
const char *cp, *sp, *ep;
struct ref_formatting_state state = REF_FORMATTING_STATE_INIT;
@ -2602,7 +2602,7 @@ int format_ref_array_item(struct ref_array_item *info,
@@ -2602,7 +2602,7 @@ int format_ref_array_item(struct ref_array_item *info,
}
void pretty_print_ref(const char *name, const struct object_id *oid,
const struct ref_format *format)
struct ref_format *format)
{
struct ref_array_item *ref_item;
struct strbuf output = STRBUF_INIT;