summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f8c6288)
raw | patch | inline | side by side (parent: f8c6288)
author | Johannes Sixt <j6t@kdbg.org> | |
Sun, 1 Mar 2009 10:20:03 +0000 (11:20 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 2 Mar 2009 07:58:41 +0000 (23:58 -0800) |
Short story: There is a section in t3400 that tests fundamental rebase
properties. 3ec7371f (Add two extra tests for git rebase, 2009-02-09)
added a check that rebase works on a detached HEAD, but the test was put
near the end of the file. This moves it to a more suitable place.
Long story: The test that preceded the one in question tests that a
rebased commit degrades from a content change with mode change to a
mere mode change. But on Windows, where we have core.filemode=false,
the original commit did not record the mode change, and so the rebase
operation did not rebase anything. This caused the subsequent detached
HEAD test to fail.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
properties. 3ec7371f (Add two extra tests for git rebase, 2009-02-09)
added a check that rebase works on a detached HEAD, but the test was put
near the end of the file. This moves it to a more suitable place.
Long story: The test that preceded the one in question tests that a
rebased commit degrades from a content change with mode change to a
mere mode change. But on Windows, where we have core.filemode=false,
the original commit did not record the mode change, and so the rebase
operation did not rebase anything. This caused the subsequent detached
HEAD test to fail.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3400-rebase.sh | patch | blob | history |
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 8c0c5f59827544b47cc7a75f0c3f39cfcecf0a7e..be7ae5a0041a0d06b40a7152d4c5d495a842a87f 100755 (executable)
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
'the rebase operation should not have destroyed author information' \
'! (git log | grep "Author:" | grep "<>")'
+test_expect_success 'HEAD was detached during rebase' '
+ test $(git rev-parse HEAD@{1}) != $(git rev-parse my-topic-branch@{1})
+'
+
test_expect_success 'rebase after merge master' '
git reset --hard topic &&
git merge master &&
GIT_TRACE=1 git rebase master
'
-test_expect_success 'HEAD was detached during rebase' '
- test $(git rev-parse HEAD@{1}) != $(git rev-parse modechange@{1})
-'
-
test_expect_success 'Show verbose error when HEAD could not be detached' '
: > B &&
test_must_fail git rebase topic 2> output.err > output.out &&