rebase from ambiguous ref discards changes
- From
Keith Packard <keithp@keithp.com>
- Date
- Sep 6, 2007, 21:48 UTC
- Message-ID
- <1189115308.30308.9.camel@koto.keithp.com>
So, I started with a very simple repository
---*--- master
\
-- origin/masterFrom 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. $
Note the lack of the usual 'Applying <patch>' messages.
checking the tree, I now had
---*
\
-- origin/master
masterwith my patch lost.
recovering my patch (having the ID in my terminal window from the commit), I named it 'master-with-fix'
---*--- master-with-fix
\
-- origin/master
masterNow the rebase from 'master-with-fix worked as expected:
$ git-rebase origin/master First, rewinding head to replay your work on top of it... HEAD is now at 2a8592f... Fix G33 GTT stolen mem range
Applying Switch to pci_device_map_range/pci_device_unmap_range APIs.
Adds trailing whitespace. .dotest/patch:225: Adds trailing whitespace. .dotest/patch:226: if (IS_I965G(pI830)) Adds trailing whitespace. .dotest/patch:446: dev->regions[mmio_bar].size, Adds trailing whitespace. .dotest/patch:449: warning: 4 lines add whitespace errors. Wrote tree cd373666254d56a137d282deeb15a2ccaf8da22b Committed: 286f5df0b62f571cbb4dbf120679d3af029b8775 $
And the tree looks right too:
--- origin/master --- master-with-fix
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.
Git made me sad today; I'm not sure it's ever disappointed like this before.
-- keith.packard@intel.com