Re: [RFC/PATCH] Re: git submodule -b ... of current HEAD fails

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

 



Am 29.12.2010 01:34, schrieb Junio C Hamano:
> Jens Lehmann <Jens.Lehmann@xxxxxx> writes:
>> (But AFAIK the patch doesn't really fix the issue, please see [1] and
>> Jonathan's followup)
>>
>> [1] http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/772659/focus=163242
> 
> I think we queued the later round just uses "checkout -B"; shouldn't that
> work?

That's what I thought too (and that is what I based my ack upon, the
patch hit the right spot and used the - according to the documentation
- better suited -B option). But while writing the test you rightfully
requested I noticed that using -B didn't change much. The reason is
that the following commands both fail in a freshly cloned repo:

$ git checkout -f -q -b master origin/master
fatal: git checkout: branch master already exists
$ git checkout -f -q -B master origin/master
fatal: Cannot force update the current branch.

So maybe the real problem here is that "git checkout -B" barfs when it
doesn't have anything to do instead of silently doing nothing?

So we maybe want to fix this issue in "git checkout"? Then the patch
will start working (and the test for it can be added in a later patch).
--
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]