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

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

> Change the error message for `git checkout -b "I LOVE YOU"' and other
> invalid branch names to say what branch names are invalid, rather than
> just saying we don't like it.
>
> Before:
>
>     $ git checkout -b "I LOVE YOU"
>     fatal: git checkout: we do not like 'I LOVE YOU' as a branch name.
>
> After:
>
>     $ git checkout -b "I LOVE YOU"
>     fatal: git checkout: The name "I LOVE YOU" is not a valid Git branch name.
>     A branch name can not:
>         - Have a path component that begins with "."
>         - Have a double dot ".."
>         - Have an ASCII control character, "~", "^", ":" or SP, anywhere
>         - End with a "/"
>         - End with ".lock"
>         - Contain a "\" (backslash

Cluttering the output without protecting it with "advice" does not look
like a "fix" nor improvement.
--
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]