git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] rebase-i: keep old parents when preserving merges
Date: Wed, 16 Jul 2008 23:51:11 +0200	[thread overview]
Message-ID: <20080716215111.GB18558@leksak.fem-net> (raw)
In-Reply-To: <7vd4ldpl3k.fsf@gitster.siamese.dyndns.org>

Hi,

Junio C Hamano wrote:
> Stephan Beyer <s-beyer@gmx.net> writes:
> 
> ... Based on the discussion thread, here is a rewrite of the log message.
> 
> > When "rebase -i -p" tries to preserve merges of unrelated branches, it
> > lost some parents:
> >
> >  - When you have more than two parents, the commit in the new history
> >    ends up with fewer than expected number of parents and this breakage
> >    goes unnoticed;
> >
> >  - When you are rebasing a merge with two parents and one is lost, the
> >    command tries to cherry-pick the original merge commit, and the command
> >    fails.
> >
> > Signed-off-by: Stephan Beyer <s-beyer@gmx.net>

Ok, big thanks :)

> > diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> > index a35212d..0df7640 100755
> > --- a/git-rebase--interactive.sh
> > +++ b/git-rebase--interactive.sh
> > @@ -174,6 +174,8 @@ pick_one_preserving_merges () {
> >  				new_parents="$new_parents $new_p"
> >  				;;
> >  			esac
> > +		else
> > +			new_parents="$new_parents $p"
> >  		fi
> >  	done
> 
> Reading the surrounding code, it makes me wonder if you also need to futz
> with variables like $preserve and $fast_forward.

No, I would not see a reason for that.

Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

      reply	other threads:[~2008-07-16 21:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16  1:51 [PATCH] rebase-i: keep old parents when preserving merges Stephan Beyer
2008-07-16  2:26 ` Stephan Beyer
2008-07-16  2:33 ` Johannes Schindelin
2008-07-16  9:43   ` Stephan Beyer
2008-07-16 10:24     ` Johannes Schindelin
2008-07-16 21:36 ` Junio C Hamano
2008-07-16 21:51   ` Stephan Beyer [this message]

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=20080716215111.GB18558@leksak.fem-net \
    --to=s-beyer@gmx.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 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).