diff options
Diffstat (limited to 'builtin/branch.c')
| -rw-r--r-- | builtin/branch.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index 0591b22a48..b2e1895ca9 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -62,19 +62,19 @@ static unsigned char merge_filter_ref[20]; static struct string_list output = STRING_LIST_INIT_DUP; static unsigned int colopts; -static int parse_branch_color_slot(const char *var, int ofs) +static int parse_branch_color_slot(const char *slot) { - if (!strcasecmp(var+ofs, "plain")) + if (!strcasecmp(slot, "plain")) return BRANCH_COLOR_PLAIN; - if (!strcasecmp(var+ofs, "reset")) + if (!strcasecmp(slot, "reset")) return BRANCH_COLOR_RESET; - if (!strcasecmp(var+ofs, "remote")) + if (!strcasecmp(slot, "remote")) return BRANCH_COLOR_REMOTE; - if (!strcasecmp(var+ofs, "local")) + if (!strcasecmp(slot, "local")) return BRANCH_COLOR_LOCAL; - if (!strcasecmp(var+ofs, "current")) + if (!strcasecmp(slot, "current")) return BRANCH_COLOR_CURRENT; - if (!strcasecmp(var+ofs, "upstream")) + if (!strcasecmp(slot, "upstream")) return BRANCH_COLOR_UPSTREAM; return -1; } @@ -88,7 +88,7 @@ static int git_branch_config(const char *var, const char *value, void *cb) return 0; } if (starts_with(var, "color.branch.")) { - int slot = parse_branch_color_slot(var, 13); + int slot = parse_branch_color_slot(var + 13); if (slot < 0) return 0; if (!value) |
