Merge branch 'nd/edit-branch-desc-while-detached' into HEAD
* nd/edit-branch-desc-while-detached: branch: no detached HEAD check when editing another branch's description
This commit is contained in:
commit
35484d4acd
@ -852,11 +852,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
|
|||||||
const char *branch_name;
|
const char *branch_name;
|
||||||
struct strbuf branch_ref = STRBUF_INIT;
|
struct strbuf branch_ref = STRBUF_INIT;
|
||||||
|
|
||||||
if (detached)
|
if (!argc) {
|
||||||
die("Cannot give description to detached HEAD");
|
if (detached)
|
||||||
if (!argc)
|
die("Cannot give description to detached HEAD");
|
||||||
branch_name = head;
|
branch_name = head;
|
||||||
else if (argc == 1)
|
} else if (argc == 1)
|
||||||
branch_name = argv[0];
|
branch_name = argv[0];
|
||||||
else
|
else
|
||||||
die(_("cannot edit description of more than one branch"));
|
die(_("cannot edit description of more than one branch"));
|
||||||
|
Loading…
Reference in New Issue
Block a user