Re: bug? in checkout with ambiguous refnames
- From
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
- Date
- Jan 12, 2011, 09:11 UTC
- Message-ID
- <20110112091130.GC24920@pengutronix.de>
- In-Reply-To
- <20110107194909.GB6175@sigill.intra.peff.net>
Hi Peff,
On Fri, Jan 07, 2011 at 02:49:09PM -0500, Jeff King wrote:
Show 17 quoted lines
> On Fri, Jan 07, 2011 at 11:46:50AM +0100, Uwe Kleine-König wrote: > > > ukl@octopus:~/gsrc/linux-2.6$ git diff; git diff --cached > > > > ukl@octopus:~/gsrc/linux-2.6$ git checkout sgu/mxs-amba-uart > > warning: refname 'sgu/mxs-amba-uart' is ambiguous. > > Previous HEAD position was c13fb17... Merge commit '65e29a85a419f9a161ab0f09f9d69924e36d940e' into HEAD > > Switched to branch 'sgu/mxs-amba-uart' > > > > OK, it might be a bad idea to have this ambiguity, still ... > > [...] > > So working copy and cache are at refs/tags/sgu/mxs-amba-uart, HEAD > > points to refs/heads/sgu/mxs-amba-uart > > Yeah, we generally resolve ambiguities in favor of the tag (and that > warning comes from deep within get_sha1_basic). So the real bug here is > that it still said "Switched to branch", which is totally wrong.
I wonder how I can resolve the ambiguity when calling checkout. (Well apart from changing either branch name or tag name)
git checkout refs/heads/sgu/mxs-amba-uart results in a detached HEAD.
Best regards Uwe
-- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |