Re: [PATCH] checkout: Better error message on invalid branch name

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

 



On Mon, Jun 21, 2010 at 20:58, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Cluttering the output without protecting it with "advice" does not look
> like a "fix" nor improvement.

The short version of the message would also need to be fixed then, to
do that properly would require bigger changes in the return code of
bad_ref_char and the functions that call it. Then we could have e.g.:

    $ git checkout -b "I LOVE YOU"
    fatal: git checkout: Branch name cannot contain ' ';  marked by
<-- HERE in 'I ' <-- HERE

Similar to what you get from:

    $ perl -e '/I LOVE [/'

That would also make the long version unnecessary, and maybe improve
some other error messages that deal with ref names.
--
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]