Merge branch 'nd/edit-branch-desc-while-detached' into maint
Attempt to "branch --edit-description" an existing branch, while being on a detached HEAD, errored out. * nd/edit-branch-desc-while-detached: branch: no detached HEAD check when editing another branch's description
This commit is contained in:
commit
6cc01490c3
@ -850,11 +850,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
||||
const char *branch_name;
|
||||
struct strbuf branch_ref = STRBUF_INIT;
|
||||
|
||||
if (detached)
|
||||
die("Cannot give description to detached HEAD");
|
||||
if (!argc)
|
||||
if (!argc) {
|
||||
if (detached)
|
||||
die("Cannot give description to detached HEAD");
|
||||
branch_name = head;
|
||||
else if (argc == 1)
|
||||
} else if (argc == 1)
|
||||
branch_name = argv[0];
|
||||
else
|
||||
usage_with_options(builtin_branch_usage, options);
|
||||
|
Loading…
Reference in New Issue
Block a user