branch: die on config error when editing branch description

Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Feb 22, 2016 at 12:23 UTC bd25f890146f7e39b18f67113f1bf2e4741a4fb4
1 file changed +2 -3
builtin/branch.c
+2 -3
@@ -570,7 +570,6 @@ static const char edit_description[] = "BRANCH_DESCRIPTION";
570
571 static int edit_branch_description(const char *branch_name)
572 {
573 - int status;
573 struct strbuf buf = STRBUF_INIT;
574 struct strbuf name = STRBUF_INIT;
575
@@ -595,11 +594,11 @@ static int edit_branch_description(const char *branch_name)
594 strbuf_stripspace(&buf, 1);
595
596 strbuf_addf(&name, "branch.%s.description", branch_name);
598 - status = git_config_set(name.buf, buf.len ? buf.buf : NULL);
597 + git_config_set_or_die(name.buf, buf.len ? buf.buf : NULL);
598 strbuf_release(&name);
599 strbuf_release(&buf);
600
602 - return status;
601 + return 0;
602 }
603
604 int cmd_branch(int argc, const char **argv, const char *prefix)