branch: change the error messages to be more meaningful
authorKaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Mon, 21 Aug 2017 13:36:08 +0000 (19:06 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Oct 2017 04:08:17 +0000 (13:08 +0900)
commitf77762351445a73bbafc1464b4676d046e726468
tree6ef70f3742099555cd2f01c1701c482d939c3ab7
parent4010f1d1b782eb7585e0e0abcefa794bd5ff29a0
branch: change the error messages to be more meaningful

The error messages shown when the branch command is misused
by supplying it wrong number of parameters wasn't meaningful.
That's because it used the the phrase "too many branches"
assuming all parameters to be "valid" branch names. It's not
always the case as exemplified below,

        $ git branch
          foo
        * master

        $ git branch -m foo foo old
        fatal: too many branches for a rename operation

Change the messages to be more general thus making no assumptions
about the "parameters".

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/branch.c