Re: Bug: "git checkout -b" should be allowed in empty repo

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

 



Michael Haggerty <mhagger@xxxxxxxxxxxx> writes:

>> So we are breaking the equivalence between these three only when HEAD
>> points at an unborn branch.
>
> You are thinking too much like a developer and not like a user.  For a user,
>
>     git checkout -b foo
>
> is a short-hand for
>
>     "create and check out a branch at my current state"
>
> and the interpretation of what that means when I am on an unborn branch
> seems unambiguous.

Ok, that is a very good explanation.

Care to come up with a patch to Documentation/git-checkout.txt?  The
description there strongly implies that <start point> is an existing
commit.  Not much is said about what the lack of <start point> mean when
it describes "checkout -b", and a standalone description of <start point>
says "The name of a comit at which to start... Defaults to HEAD".  These
need to be loosened and described in terms of the closer-to-the-user "at
my current state".

--
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]