On Tue, Jan 2, 2018 at 6:17 AM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > On Mon, Jan 1, 2018 at 5:54 PM, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote: > s/exit/exist/ Thanks. >> query does). >> >> Signed-off-by: SZEDER Gábor <szeder.dev@xxxxxxxxx> >> --- >> diff --git a/builtin/branch.c b/builtin/branch.c >> @@ -737,6 +741,35 @@ int cmd_branch(int argc, const char **argv, const char *prefix) >> + } else if (show_description) { >> + [...] >> + if (!argc) { >> + if (filter.detached) >> + die(_("cannot show description on detached HEAD")); >> + branch_name = head; >> + } else if (argc == 1) >> + branch_name = argv[0]; >> + else >> + die(_("cannot show description of more than one branch")); > > Aside from paralleling the single branch accepted by > --edit-description, why this limitation? (Just curious; I don't feel > strongly one way or the other.) It's not just '--edit-description', most other options won't accept multiple branches either. As far as I can tell only deleting branches can deal with multiple branches in one go. Furthermore, branch descriptions are likely more lines long, so we can't just dump them one after the other, but we we would have to separate the descriptions of different branches in the output. Considering that 'git branch' mostly works only with a single branch at a time, I didn't feel the need to do so. Gábor