summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d80d6bc)
raw | patch | inline | side by side (parent: d80d6bc)
author | Stephen Haberman <stephen@exigencecorp.com> | |
Wed, 15 Oct 2008 07:44:40 +0000 (02:44 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 16 Oct 2008 16:23:54 +0000 (09:23 -0700) |
This seems like the best guess we can make until git sequencer marks are
available. That being said, within the context of re-ordering a commit before
its parent in todo, I think applying it on top of the current commit seems like
a reasonable assumption of what the user intended.
Signed-off-by: Stephen Haberman <stephen@exigencecorp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
available. That being said, within the context of re-ordering a commit before
its parent in todo, I think applying it on top of the current commit seems like
a reasonable assumption of what the user intended.
Signed-off-by: Stephen Haberman <stephen@exigencecorp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh | patch | blob | history | |
t/t3411-rebase-preserve-around-merges.sh | [changed mode: 0755->0644] | patch | blob | history |
index 495f554b6576cfb1f32d94f319b325a4de9d648d..848fbe7d5913a009c75da2486b7cea3563617b10 100755 (executable)
if test -f "$REWRITTEN"/$p
then
new_p=$(cat "$REWRITTEN"/$p)
+
+ # If the todo reordered commits, and our parent is marked for
+ # rewriting, but hasn't been gotten to yet, assume the user meant to
+ # drop it on top of the current HEAD
+ if test -z "$new_p"
+ then
+ new_p=$(git rev-parse HEAD)
+ fi
+
test $p != $new_p && fast_forward=f
case "$new_parents" in
*$new_p*)
# \ /
# -- C1 --
#
-test_expect_failure 'squash F1 into D1' '
+test_expect_success 'squash F1 into D1' '
FAKE_LINES="1 squash 3 2" git rebase -i -p B1 &&
test "$(git rev-parse HEAD^2)" = "$(git rev-parse branch)" &&
test "$(git rev-parse HEAD~2)" = "$(git rev-parse B1)" &&
#
# And rebase G1..M1 onto E2
-test_expect_failure 'rebase two levels of merge' '
+test_expect_success 'rebase two levels of merge' '
git checkout -b branch2 A1 &&
touch g &&
git add g &&