All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David M. Lloyd" <david.lloyd@redhat.com>
To: Git List <git@vger.kernel.org>
Subject: Apparent bug in git rebase with a merge commit
Date: Tue, 07 Oct 2014 13:30:06 -0500	[thread overview]
Message-ID: <5434312E.6040407@redhat.com> (raw)

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

             reply	other threads:[~2014-10-07 18:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 18:30 David M. Lloyd [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5434312E.6040407@redhat.com \
    --to=david.lloyd@redhat.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.