Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
branch: die on config error when editing branch description
author
Patrick Steinhardt
<ps@pks.im>
Mon, 22 Feb 2016 11:23:25 +0000
(12:23 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 22 Feb 2016 18:23:52 +0000
(10:23 -0800)
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
b81842c
)
diff --git
a/builtin/branch.c
b/builtin/branch.c
index 09782876b8326c1c0509db9a116026959bfe4409..c043cfc72989bf35893d108f62cc8aa995d3a53f 100644
(file)
--- a/
builtin/branch.c
+++ b/
builtin/branch.c
@@
-570,7
+570,6
@@
static const char edit_description[] = "BRANCH_DESCRIPTION";
static int edit_branch_description(const char *branch_name)
{
static int edit_branch_description(const char *branch_name)
{
- int status;
struct strbuf buf = STRBUF_INIT;
struct strbuf name = STRBUF_INIT;
struct strbuf buf = STRBUF_INIT;
struct strbuf name = STRBUF_INIT;
@@
-595,11
+594,11
@@
static int edit_branch_description(const char *branch_name)
strbuf_stripspace(&buf, 1);
strbuf_addf(&name, "branch.%s.description", branch_name);
strbuf_stripspace(&buf, 1);
strbuf_addf(&name, "branch.%s.description", branch_name);
-
status = git_config_set
(name.buf, buf.len ? buf.buf : NULL);
+
git_config_set_or_die
(name.buf, buf.len ? buf.buf : NULL);
strbuf_release(&name);
strbuf_release(&buf);
strbuf_release(&name);
strbuf_release(&buf);
- return
status
;
+ return
0
;
}
int cmd_branch(int argc, const char **argv, const char *prefix)
}
int cmd_branch(int argc, const char **argv, const char *prefix)