Skip to content

Commit bd25f89

Browse files
pks-tgitster
authored andcommitted
branch: die on config error when editing branch description
Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b81842c commit bd25f89

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin/branch.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,6 @@ static const char edit_description[] = "BRANCH_DESCRIPTION";
570570

571571
static int edit_branch_description(const char *branch_name)
572572
{
573-
int status;
574573
struct strbuf buf = STRBUF_INIT;
575574
struct strbuf name = STRBUF_INIT;
576575

@@ -595,11 +594,11 @@ static int edit_branch_description(const char *branch_name)
595594
strbuf_stripspace(&buf, 1);
596595

597596
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);
599598
strbuf_release(&name);
600599
strbuf_release(&buf);
601600

602-
return status;
601+
return 0;
603602
}
604603

605604
int cmd_branch(int argc, const char **argv, const char *prefix)

0 commit comments

Comments
 (0)