Re: Checking out orphans with -f

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

 



Martin Fick <mfick@xxxxxxxxxxxxxx> writes:

> Actually, no I can't.  I can check out some other branch 
> (assuming I have one), but I cannot then delete a, it 
> appears to already be deleted by virtue of checking out 
> another branch.  I like that since I never checked it in, 
> better to clean up the garbage.

Good.

> ...but why can't I then 
> checkout another orphan to do the same thing?

I am not surprised if the original contributor who wanted to add --orphan
did not address corner cases.  It is very plausible that we did not try as
hard to nitpick the code for complete support of such corner cases as I
and other contributors usually do for more important features.

So... Patches welcome ;-)

Having said that, there are many things to consider to fill the corner
case you seem to be interested to add support for.

The "orphaned" state is like immediately after "git init". Because you do
not have any current commit, you cannot create an orphan branch based the
state immediately after "git init", either. You are nominally on your
'master' branch, but it does not have anything yet; you are expected to
turn it into a real branch by creating a commit soon, but until you do so,
you are kind of in-limbo. It is understandable that there will be many
operations that will not make any sense until you first get out of this
in-limbo state.  For example, you cannot (and do not have to) delete the
branch and if you have a commit (e.g. you can fetch one from another
place) you can check it out and the 'master' will be gone, because you
never created it in the first place.

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