public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas•com>
To: Thomas Rast <trast@student•ethz.ch>
Cc: Git List <git@vger•kernel.org>
Subject: Re: git rebase + fuzz = possible bad merge
Date: Mon, 23 Mar 2009 16:06:56 +0200	[thread overview]
Message-ID: <49C79780.20105@panasas.com> (raw)
In-Reply-To: <200903231454.48600.trast@student.ethz.ch>

On Mar. 23, 2009, 15:54 +0200, Thomas Rast <trast@student•ethz.ch> wrote:
> Benny Halevy wrote:
>> I'm hitting bad merges with (non interactive) git rebase
>> when a hunk is merged pre-maturely into an inexact match
>> when there's fuzz.
> [...]
>> { for i in {1..10}; do echo fuzz $i; done; echo; cat test_file; } > fuzz_file
> [...]
>> git rebase --onto test_branch master^ master
> 
> git-am, and by extension rebase, by default doesn't take history into
> account.  It just applies the patches "blindly".  Thus, there's no way
> to know which series of 'line N' you really wanted it to go onto.
> 
> To avoid this issue, use the -m option to git-rebase so that it uses a
> "real" merge.  (You can achieve similar effects for git-am with the -3
> option.)
> 

OK. -m indeed helps and I'm certainly going to adopt it for my rebase scripts.
git rebase -i does too, BTW.

I would expect though that the default mode for automatic rebase would be
the strictest and safest...

Benny

  reply	other threads:[~2009-03-23 14:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 10:41 git rebase + fuzz = possible bad merge Benny Halevy
2009-03-23 13:54 ` Thomas Rast
2009-03-23 14:06   ` Benny Halevy [this message]
2009-03-23 15:36     ` Benny Halevy

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=49C79780.20105@panasas.com \
    --to=bhalevy@panasas$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=trast@student$(echo .)ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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