Re: [PATCH] branch: give better message when no names specified for rename
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 31, 2013, 01:35 UTC
- Message-ID
- <CACsJy8Bs0pBmoMjXB9rStb8_b5tQ1Tb8xT62EuFFj71osKR9Jg@mail.gmail.com>
- In-Reply-To
- <00E97900-F00D-455F-A3EB-52D0A3CF5CF6@JonathonMah.com>
On Sun, Mar 31, 2013 at 8:27 AM, Jonathon Mah <me@jonathonmah.com> wrote:
Show 7 quoted lines
> - if (argc == 1)
> + if (!argc)
> + die(_("branch name required"));
> + else if (argc == 1)
> rename_branch(head, argv[0], rename > 1);
> else if (argc == 2)
> rename_branch(argv[0], argv[1], rename > 1);This makes four branches based on argc. Maybe we should convert if/else chain to switch/case. -- Duy