From: Thomas Rast <trast@student.ethz.ch>
To: git@vger.kernel.org
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: [BUG?] rebase -i -p leaves index changed
Date: Tue, 12 Aug 2008 11:16:39 +0200 [thread overview]
Message-ID: <200808121116.41535.trast@student.ethz.ch> (raw)
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
Hi,
'rebase -i -p' appears to be a bit confused about what it is doing.
Try a history like this:
O -- A -- M -- B
\ /
\- C -/
built by:
git init
touch foo
git add foo
git ci -m initial
git tag root
git co -b side
echo blah > other
git add other
git ci -m other
git co master
echo a >> foo
git add foo
git ci -m a
git add foo
git merge side
echo b >> foo
git add foo
git ci -m 'b: depends on side'
First try this:
GIT_EDITOR=true git rebase -i -p root
git diff --cached
resulting in
diff --git a/foo b/foo
index 422c2b7..e69de29 100644
--- a/foo
+++ b/foo
@@ -1,2 +0,0 @@
-a
-b
diff --git a/other b/other
deleted file mode 100644
index 907b308..0000000
--- a/other
+++ /dev/null
@@ -1 +0,0 @@
-blah
Second, 'edit' is also a bit suspicious:
git reset --hard
GIT_EDITOR='perl -i -pe "s/pick 096/edit 096/"' git rebase -i -p root
Despite claiming "Stopped at 096[...] a", a quick 'git show' tells us
that it is actually stuck at 'initial'. (At least 'git rebase
--continue' then ends up with the same result as the first test.)
Granted, I'm not entirely sure what it _should_ do. In my use case
(relating to the filter-branch topic), C was a commit from elsewhere
that B depended on. So I kind of hoped 'rebase -i -p' would let me
edit A, then rebuild M and B on top, while leaving C alone.
- Thomas
--
Thomas Rast
trast@student.ethz.ch
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2008-08-12 9:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-12 9:16 Thomas Rast [this message]
2008-08-13 10:04 ` [PATCH 1/2] rebase -i -p: handle index and workdir correctly Thomas Rast
2008-08-13 10:04 ` [PATCH 2/2] rebase -i -p: fix parent rewriting Thomas Rast
2008-08-13 10:07 ` [PATCH 1/2] rebase -i -p: handle index and workdir correctly Thomas Rast
2008-08-13 11:56 ` [PATCH v2 " Thomas Rast
2008-08-13 11:57 ` [PATCH v2 2/2] rebase -i -p: fix parent rewriting Thomas Rast
2008-08-13 20:58 ` [PATCH v2 1/2] rebase -i -p: handle index and workdir correctly Stephan Beyer
2008-08-13 21:41 ` [PATCH v3 " Thomas Rast
2008-08-13 21:41 ` [PATCH v3 2/2] rebase -i -p: fix parent rewriting Thomas Rast
2008-08-13 20:51 ` [BUG?] rebase -i -p leaves index changed 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=200808121116.41535.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=Johannes.Schindelin@gmx.de \
--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).