summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-01-03 21:03:08 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-03 07:43:12 -0800
commit4b5553b5f31c99f5c0a770d4bab2175fa89dd53a (patch)
tree05346de5ab5d43f1c973691efddc53c4484e00e0 /builtin
parentconfig.txt: a few lines about branch.<name>.description (diff)
downloadtgif-4b5553b5f31c99f5c0a770d4bab2175fa89dd53a.tar.xz
branch: delete branch description if it's empty
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 0e060f2e4a..a6d33502f2 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -700,7 +700,7 @@ static int edit_branch_description(const char *branch_name)
stripspace(&buf, 1);
strbuf_addf(&name, "branch.%s.description", branch_name);
- status = git_config_set(name.buf, buf.buf);
+ status = git_config_set(name.buf, buf.len ? buf.buf : NULL);
strbuf_release(&name);
strbuf_release(&buf);