{"thread":{"id":"18077","subject":"[PATCH 1/3] t3400-rebase: Move detached HEAD check earlier","startedAt":"2009-03-01T10:20:03Z","lastAt":"2009-03-02T08:03:19Z","messageCount":3,"participants":["Johannes Sixt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"106599","messageId":"1235902803-32528-1-git-send-email-j6t@kdbg.org","threadId":"18077","inReplyTo":null,"subject":"[PATCH 1/3] t3400-rebase: Move detached HEAD check earlier","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-01T10:20:03Z","receivedAt":"2009-03-01T10:20:03Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Short story: There is a section in t3400 that tests fundamental rebase\nproperties.  3ec7371f (Add two extra tests for git rebase, 2009-02-09)\nadded a check that rebase works on a detached HEAD, but the test was put\nnear the end of the file.  This moves it to a more suitable place.\n\nLong story: The test that preceded the one in question tests that a\nrebased commit degrades from a content change with mode change to a\nmere mode change.  But on Windows, where we have core.filemode=false,\nthe original commit did not record the mode change, and so the rebase\noperation did not rebase anything.  This caused the subsequent detached\nHEAD test to fail.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t3400-rebase.sh |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh\nindex 8c0c5f5..be7ae5a 100755\n--- a/t/t3400-rebase.sh\n+++ b/t/t3400-rebase.sh\n@@ -48,6 +48,10 @@ test_expect_success \\\n     'the rebase operation should not have destroyed author information' \\\n     '! (git log | grep \"Author:\" | grep \"<>\")'\n \n+test_expect_success 'HEAD was detached during rebase' '\n+     test $(git rev-parse HEAD@{1}) != $(git rev-parse my-topic-branch@{1})\n+'\n+\n test_expect_success 'rebase after merge master' '\n      git reset --hard topic &&\n      git merge master &&\n@@ -85,10 +89,6 @@ test_expect_success 'rebase a single mode change' '\n      GIT_TRACE=1 git rebase master\n '\n \n-test_expect_success 'HEAD was detached during rebase' '\n-     test $(git rev-parse HEAD@{1}) != $(git rev-parse modechange@{1})\n-'\n-\n test_expect_success 'Show verbose error when HEAD could not be detached' '\n      : > B &&\n      test_must_fail git rebase topic 2> output.err > output.out &&\n-- \n1.6.2.rc1.27.g29e57\n"},{"id":"106602","messageId":"200903011221.23615.j6t@kdbg.org","threadId":"18077","inReplyTo":"1235902803-32528-1-git-send-email-j6t@kdbg.org","subject":"Re: [PATCH 1/3] t3400-rebase: Move detached HEAD check earlier","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-01T11:21:23Z","receivedAt":"2009-03-01T11:21:23Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Hmpf. There won't be 2/3 or 3/3 today :-(\n\nI've set format.numbered to false now.\n\n-- Hannes\n"},{"id":"106677","messageId":"7vmyc45p2w.fsf@gitster.siamese.dyndns.org","threadId":"18077","inReplyTo":"1235902803-32528-1-git-send-email-j6t@kdbg.org","subject":"Re: [PATCH 1/3] t3400-rebase: Move detached HEAD check earlier","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-02T08:03:19Z","receivedAt":"2009-03-02T08:03:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> Long story: The test that preceded the one in question tests that a\n> rebased commit degrades from a content change with mode change to a\n> mere mode change.  But on Windows, where we have core.filemode=false,\n> the original commit did not record the mode change, and so the rebase\n> operation did not rebase anything.  This caused the subsequent detached\n> HEAD test to fail.\n\nThanks.\n\nI'll apply it as is since it is very close to the real release, but I\nthink a more suitable fix would be to make tests less dependent on the\noutcome of earlier tests.\n"}]}