diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2013-01-03 18:03:08 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-03 19:43:12 +0400 |
commit | 4b5553b5f31c99f5c0a770d4bab2175fa89dd53a (patch) | |
tree | 05346de5ab5d43f1c973691efddc53c4484e00e0 /builtin/branch.c | |
parent | a5ba2cbe1443b7fe7b2977e07dbe7c08435e71b4 (diff) |
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/branch.c')
-rw-r--r-- | builtin/branch.c | 2 |
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); |