From: Constantine Plotnikov <constantine.plotnikov@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: BUG: git rebase -i -p silently looses commits
Date: Mon, 2 Nov 2009 19:18:07 +0300 [thread overview]
Message-ID: <85647ef50911020818p61d0c975kd5655fa58993e07b@mail.gmail.com> (raw)
I have encountered what looks like critical bugs in the git rebase -i
-p (it can be reproduced on mingw and cygwin, I have not tried other
platforms).
Let's create a git repository with
git init
# the next line is for mingw
git config core.autocrlf input
echo a >a.txt
echo b >b.txt
git add a.txt b.txt
git commit -m "init commit"
echo aa >a.txt
git add a.txt
git commit -m "aa commit"
echo bb >b.txt
git add b.txt
git commit -m "bb commit"
echo aaa >a.txt
git add a.txt
git commit -m "aaa commit"
Now let's use the following rebase command:
git rebase -i -p HEAD~3
When the editor will appear, just move the commit "bb commit" to the
end of the list. The rebase process will complete successfully, but
commit "aaa commit" will be missing from the history and working tree
will not be affected by that commit.
Other bug is that if we move "bb commit" to the top of the list in the
editor, the rebase process will apply "bb commit", but instead of
applying "aa commit" and than "aaa commit", the rebase process fails
with a merge conflict.
This can be reproduced with git 1.6.5.1 (msys) and 1.6.1.2 (cygwin). I
consider these to be a critical bugs that make "-p" option extremely
dangerous for interactive rebase. It might even make sense to disable
it for interactive rebase until the bug is fixed.
Regards,
Constantine
next reply other threads:[~2009-11-02 16:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 16:18 Constantine Plotnikov [this message]
2009-11-02 16:33 ` BUG: git rebase -i -p silently looses commits demerphq
2009-11-02 16:59 ` Constantine Plotnikov
2009-11-02 16:56 ` Sverre Rabbelier
2009-11-02 17:34 ` Johannes Schindelin
2009-11-04 21:46 ` Greg Price
2009-11-11 17:32 ` Johannes Schindelin
2009-11-12 17:57 ` Greg Price
2009-11-13 9:07 ` Johannes Schindelin
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=85647ef50911020818p61d0c975kd5655fa58993e07b@mail.gmail.com \
--to=constantine.plotnikov@gmail.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).