git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Apparent bug in git rebase with a merge commit
@ 2014-10-07 18:30 David M. Lloyd
  2014-10-09 18:50 ` [PATCH v1] rebase -m: Use empty tree base for parentless commits Fabian Ruch
  0 siblings, 1 reply; 8+ messages in thread
From: David M. Lloyd @ 2014-10-07 18:30 UTC (permalink / raw)
  To: Git List

If you have a git tree and you merge in another, independent git tree so 
that they are the same, using a merge strategy like this:

$ git merge importing/master -s recursive -Xours

And if you later on want to rebase this merge commit on a newer upstream 
for whatever reason, you get something like this:

$ git rebase -s recursive -Xours
First, rewinding head to replay your work on top of it...
fatal: Could not parse object 'ca59931ee67fc01b4db4278600d3d92aece898f4^'
Unknown exit code (128) from command: git-merge-recursive 
ca59931ee67fc01b4db4278600d3d92aece898f4^ -- HEAD 
ca59931ee67fc01b4db4278600d3d92aece898f4

The reason this occurs is that the first commit of the newly-merged-in 
code obviously has no parent, so I guess the search for the common 
ancestor is going to be doomed to fail.

It is possible that I'm misunderstanding the recursive merge strategy; 
however if this were the case I'd still expect a human-readable error 
message explaining my mistake rather than a 128 exit code.

For a workaround I'll just re-create the commit, but I thought I'd 
report this behavior anyway.
-- 
- DML

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-13 18:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 18:30 Apparent bug in git rebase with a merge commit David M. Lloyd
2014-10-09 18:50 ` [PATCH v1] rebase -m: Use empty tree base for parentless commits Fabian Ruch
2014-10-09 19:05   ` Junio C Hamano
2014-10-09 19:55     ` Fabian Ruch
2014-10-09 20:18       ` Junio C Hamano
2014-10-13 18:43     ` Fabian Ruch
2014-10-09 19:06   ` Derek Moore
2014-10-09 19:20   ` David M. Lloyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).