From: Benny Halevy <bhalevy@panasas.com>
To: Git List <git@vger.kernel.org>
Subject: git rebase + fuzz = possible bad merge
Date: Mon, 23 Mar 2009 12:41:34 +0200 [thread overview]
Message-ID: <49C7675E.9000309@panasas.com> (raw)
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.
The following shell script reproduce this with
git version 1.6.2.1:
#!/bin/sh
rm -rf test_file .git
git init
cat >test_file <<EOF
struct one {
line 1;
line 2;
line 3;
line 4;
line 5;
line 6;
line 7;
};
struct two {
line 1;
line 2;
line 3;
line 4;
line 5;
line 6;
line 7;
};
EOF
git add test_file
git commit -m test_file
git am <<EOF
From: Benny Halevy <bhalevy@panasas.com>
Subject: change struct two
diff --git a/test_file b/test_file
--- a/test_file
+++ b/test_file
@@ -12,7 +12,7 @@ struct two {
line 1;
line 2;
line 3;
- line 4;
+ LINE 4;
line 5;
line 6;
line 7;
EOF
git checkout -b test_branch HEAD^
{ for i in {1..10}; do echo fuzz $i; done; echo; cat test_file; } > fuzz_file
mv fuzz_file test_file
git commit -a -m fuzz
git rebase --onto test_branch master^ master
if [ $(awk '/LINE/ {print NR}' test_file) != 26 ]; then
echo 1>&2 $0: test failed
exit 1
else
echo 1>&2 $0: test succeeded
fi
next reply other threads:[~2009-03-23 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 10:41 Benny Halevy [this message]
2009-03-23 13:54 ` git rebase + fuzz = possible bad merge Thomas Rast
2009-03-23 14:06 ` Benny Halevy
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=49C7675E.9000309@panasas.com \
--to=bhalevy@panasas.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 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).