git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stephan Beyer <s-beyer@gmx.net>
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 14:36:47 -0700	[thread overview]
Message-ID: <7vd4ldpl3k.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1216173109-11155-1-git-send-email-s-beyer@gmx.net> (Stephan Beyer's message of "Wed, 16 Jul 2008 03:51:49 +0200")

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>
>
> 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.

  parent reply	other threads:[~2008-07-16 21:37 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 [this message]
2008-07-16 21:51   ` Stephan Beyer

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=7vd4ldpl3k.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=s-beyer@gmx.net \
    /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).