From: Johannes Sixt <J.Sixt@eudaptics•com>
To: Johannes Schindelin <Johannes.Schindelin@gmx•de>
Cc: git@vger•kernel.org
Subject: bug in rebase--interactive with squash and conflicts
Date: Tue, 21 Aug 2007 17:10:04 +0200 [thread overview]
Message-ID: <46CB004C.AC39D562@eudaptics.com> (raw)
Hi,
There's a problem with rebase--interactive where I want to squash two
commits and the one to squash is the first in the original series. In
particular, I change the commit list from
pick 1
pick 2
pick 3
to
pick 3
squash 1
pick 2
In this case, the edits of commit 3 are lost. There are conflicts when
commits 3 and 1 are cherry-picked.
You can simulate the problematic case by applying this patch:
index 40d6799..861ece1 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -252,3 +252,4 @@ 'interrupted squash works as expected' '
echo $n >> conflict &&
- git add conflict &&
+ echo $n > $n
+ git add conflict $n &&
git commit -m $n
@@ -256,3 +257,3 @@ 'interrupted squash works as expected' '
one=$(git rev-parse HEAD~3) &&
- ! FAKE_LINES="1 squash 3 2" git rebase -i HEAD~3 &&
+ ! FAKE_LINES="3 squash 1 2" git rebase -i HEAD~3 &&
(echo one; echo two; echo four) > conflict &&
The test fails now, because git rebase --continue did not fail although
it should have. Run
gitk HEAD to-be-rebased@{1}
Note that the rebase was completed, i.e. there are now 2 commits instead
of the original 3. But the file 'four' is missing and the final contents
of the file 'conflict' is
one
two
three
i.e. as if commit 3 had never taken place.
-- Hannes
next reply other threads:[~2007-08-21 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-21 15:10 Johannes Sixt [this message]
2007-08-23 8:55 ` [PATCH] rebase -i: fix squashing corner case Johannes Schindelin
2007-08-24 7:18 ` Johannes Sixt
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=46CB004C.AC39D562@eudaptics.com \
--to=j.sixt@eudaptics$(echo .)com \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=git@vger$(echo .)kernel.org \
/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