From: Christian Couder Date: Sat, 09 Nov 2013 07:06:40 GMT Subject: [PATCH 47/86] builtin/branch: replace prefixcmd() with has_prefix() Message-ID: <20131109070720.18178.39137.chriscool@tuxfamily.org> In-Reply-To: <20131109070358.18178.40248.chriscool@tuxfamily.org> Signed-off-by: Christian Couder --- builtin/branch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index ad0f86d..c4cb81c 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -81,13 +81,13 @@ static int parse_branch_color_slot(const char *var, int ofs) static int git_branch_config(const char *var, const char *value, void *cb) { - if (!prefixcmp(var, "column.")) + if (has_prefix(var, "column.")) return git_column_config(var, value, "branch", &colopts); if (!strcmp(var, "color.branch")) { branch_use_color = git_config_colorbool(var, value); return 0; } - if (!prefixcmp(var, "color.branch.")) { + if (has_prefix(var, "color.branch.")) { int slot = parse_branch_color_slot(var, 13); if (slot < 0) return 0; @@ -862,7 +862,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) if (!strcmp(head, "HEAD")) { detached = 1; } else { - if (prefixcmp(head, "refs/heads/")) + if (!has_prefix(head, "refs/heads/")) die(_("HEAD not found below refs/heads!")); head += 11; } -- 1.8.4.1.566.geca833c