Re: [PATCH] branch: give better message when no names specified for rename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 31, 2013 at 8:27 AM, Jonathon Mah <me@xxxxxxxxxxxxxxx> wrote:
> -               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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]