From: Nguyễn Thái Ngọc Duy Date: Thu, 3 Jan 2013 14:03:08 +0000 (+0700) Subject: branch: delete branch description if it's empty X-Git-Tag: v1.8.2-rc0~155^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b5553b5f31c99f5c0a770d4bab2175fa89dd53a;p=git branch: delete branch description if it's empty Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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);