diff options
Diffstat (limited to 'pretty.c')
| -rw-r--r-- | pretty.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -470,7 +470,7 @@ static inline void strbuf_add_with_color(struct strbuf *sb, const char *color, static void append_line_with_color(struct strbuf *sb, struct grep_opt *opt, const char *line, size_t linelen, - int color, enum grep_context ctx, + enum git_colorbool color, enum grep_context ctx, enum grep_header_field field) { const char *buf, *eol, *line_color, *match_color; @@ -899,7 +899,7 @@ struct format_commit_context { const char *message; char *commit_encoding; size_t width, indent1, indent2; - int auto_color; + enum git_colorbool auto_color; int padding; /* These offsets are relative to the start of the commit message. */ @@ -1455,14 +1455,14 @@ static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */ switch (placeholder[0]) { case 'C': if (starts_with(placeholder + 1, "(auto)")) { - c->auto_color = want_color(c->pretty_ctx->color); - if (c->auto_color && sb->len) + c->auto_color = c->pretty_ctx->color; + if (want_color(c->auto_color) && sb->len) strbuf_addstr(sb, GIT_COLOR_RESET); return 7; /* consumed 7 bytes, "C(auto)" */ } else { int ret = parse_color(sb, placeholder, c); if (ret) - c->auto_color = 0; + c->auto_color = GIT_COLOR_NEVER; /* * Otherwise, we decided to treat %C<unknown> * as a literal string, and the previous @@ -2167,7 +2167,7 @@ static int pp_utf8_width(const char *start, const char *end) } static void strbuf_add_tabexpand(struct strbuf *sb, struct grep_opt *opt, - int color, int tabwidth, const char *line, + enum git_colorbool color, int tabwidth, const char *line, int linelen) { const char *tab; |
