X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-branch.c;h=0c84f9f9eb75babf69eb5503f83bce5645477609;hb=03c6e97f809e5b89089a2c689d6a319e8d471455;hp=316a8336c6f4ca11c2b9ce1a6fade4f65ec279d0;hpb=814035c12a07927ea03350184a14f869cdce7276;p=git.git diff --git a/builtin-branch.c b/builtin-branch.c index 316a8336c..0c84f9f9e 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -65,7 +65,7 @@ static int parse_branch_color_slot(const char *var, int ofs) return BRANCH_COLOR_LOCAL; if (!strcasecmp(var+ofs, "current")) return BRANCH_COLOR_CURRENT; - die("bad config variable '%s'", var); + return -1; } static int git_branch_config(const char *var, const char *value, void *cb) @@ -76,6 +76,8 @@ static int git_branch_config(const char *var, const char *value, void *cb) } if (!prefixcmp(var, "color.branch.")) { int slot = parse_branch_color_slot(var, 13); + if (slot < 0) + return 0; if (!value) return config_error_nonbool(var); color_parse(value, var, branch_colors[slot]); @@ -586,7 +588,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) OPT_BIT('m', NULL, &rename, "move/rename a branch and its reflog", 1), OPT_BIT('M', NULL, &rename, "move/rename a branch, even if target exists", 2), OPT_BOOLEAN('l', NULL, &reflog, "create the branch's reflog"), - OPT_BOOLEAN('f', NULL, &force_create, "force creation (when already exists)"), + OPT_BOOLEAN('f', "force", &force_create, "force creation (when already exists)"), { OPTION_CALLBACK, 0, "no-merged", &merge_filter_ref, "commit", "print only not merged branches",