Re: rebase from ambiguous ref discards changes

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: rebase from ambiguous ref discards changes

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:34

Keith Packard [off-list ref] writes:
So, I started with a very simple repository

---*--- master
    \
     -- origin/master

From master, I did

$ git-rebase origin/master
warning: refname 'master' is ambiguous.
First, rewinding head to replay your work on top of it...
HEAD is now at 2a8592f... Fix G33 GTT stolen mem range
Fast-forwarded master to origin/master.
...
Seems like there's something going on when 'master' is ambiguous, or
perhaps some other problem.

This is all from version 1.5.3, but I think I've seen this on 1.5.2 as
well.
We haven't touched this area for a long time (like "v1.3.0" or
"since March 2006").  I wish you told us about this earlier.

I'd like to reproduce this, but I need to be sure what your
"ambiguous" situation is really like.  What ambiguous "master"s
do you have?  IOW, what does:

	git show-ref | grep master

say?  I have 11 lines of output from the above and I have never
seen a problem like this.

Perhaps you have ".git/master" by mistake?

Re: rebase from ambiguous ref discards changes

From: Keith Packard <keithp@keithp.com>
Date: 2016-06-15 22:43:34

On Thu, 2007-09-06 at 16:26 -0700, Junio C Hamano wrote:
We haven't touched this area for a long time (like "v1.3.0" or
"since March 2006").  I wish you told us about this earlier.
I would have were I certain that it wasn't user-error last time. I took
a few minutes this time to verify precisely what I saw and reproduce it.
I'd like to reproduce this, but I need to be sure what your
"ambiguous" situation is really like.  What ambiguous "master"s
do you have?  IOW, what does:

	git show-ref | grep master
$ git show-ref | grep master
286f5df0b62f571cbb4dbf120679d3af029b8775 refs/heads/master
1feb733eb8b09a8b07b7a6987add5149c53b0157 refs/heads/master-guitar
d957c6b8e1dde8e11c1db3431e0ff58c5d984880 refs/heads/master-i830
0fd3ba0518b3cde9ca0e4e2fc1854c00d8a43d5c refs/remotes/kyle/master
e25f8e145f4f73b62c32389b922291fd561af9d2 refs/remotes/origin/lg3d-master
286f5df0b62f571cbb4dbf120679d3af029b8775 refs/remotes/origin/master
e25f8e145f4f73b62c32389b922291fd561af9d2 refs/remotes/otc/lg3d-master
6781575f734f05547d7d5ceef4116fc157bba44d refs/remotes/otc/master

so, nothing obviously amiss here.
Perhaps you have ".git/master" by mistake?
oops.

$ find .git -name master
.git/master
.git/refs/heads/master
.git/refs/remotes/kyle/master
.git/refs/remotes/origin/master
.git/refs/remotes/otc/master
.git/logs/refs/heads/master
.git/logs/refs/remotes/fdo/master
.git/logs/refs/remotes/kyle/master
.git/logs/refs/remotes/origin/master
.git/logs/refs/remotes/otc/master

So, I think that explains where the ambiguous master came from.  Seems
like rebase should be able to bail out before breaking things though.

-- 
keith.packard@intel.com

Re: rebase from ambiguous ref discards changes

From: Pierre Habouzit <hidden>
Date: 2016-06-15 22:43:34

On Fri, Sep 07, 2007 at 02:58:18AM +0000, Keith Packard wrote:
On Thu, 2007-09-06 at 16:26 -0700, Junio C Hamano wrote:
quoted
Perhaps you have ".git/master" by mistake?
oops.

$ find .git -name master
..git/master
..git/refs/heads/master
..git/refs/remotes/kyle/master
..git/refs/remotes/origin/master
..git/refs/remotes/otc/master
..git/logs/refs/heads/master
..git/logs/refs/remotes/fdo/master
..git/logs/refs/remotes/kyle/master
..git/logs/refs/remotes/origin/master
..git/logs/refs/remotes/otc/master

So, I think that explains where the ambiguous master came from.  Seems
like rebase should be able to bail out before breaking things though.
  Actually if I get this right, it didn't broke anything, it just
rebased your ".git/master" :) It just chose the wrong desambiguation for
some reason.



-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help