fast-import: don't allow to tag empty branch
[gitweb.git] / t / t3404-rebase-interactive.sh
index 4fcedda23dfcf0d25bdb5d9903671b03ddf3bb58..8538813d1d0dfa72008da1d711cf2c042796a6ee 100755 (executable)
@@ -30,8 +30,8 @@ Initial setup:
 . "$TEST_DIRECTORY"/lib-rebase.sh
 
 test_cmp_rev () {
-       git describe --always --tags "$1" >expect.rev &&
-       git describe --always --tags "$2" >actual.rev &&
+       git rev-parse --verify "$1" >expect.rev &&
+       git rev-parse --verify "$2" >actual.rev &&
        test_cmp expect.rev actual.rev
 }
 
@@ -71,8 +71,9 @@ test_expect_success 'setup' '
 # "exec" commands are ran with the user shell by default, but this may
 # be non-POSIX. For example, if SHELL=zsh then ">file" doesn't work
 # to create a file. Unseting SHELL avoids such non-portable behavior
-# in tests.
+# in tests. It must be exported for it to take effect where needed.
 SHELL=
+export SHELL
 
 test_expect_success 'rebase -i with the exec command' '
        git checkout master &&
@@ -294,7 +295,7 @@ test_expect_success 'preserve merges with -p' '
 '
 
 test_expect_success 'edit ancestor with -p' '
-       FAKE_LINES="1 edit 2 3 4" git rebase -i -p HEAD~3 &&
+       FAKE_LINES="1 2 edit 3 4" git rebase -i -p HEAD~3 &&
        echo 2 > unrelated-file &&
        test_tick &&
        git commit -m L2-modified --amend unrelated-file &&
@@ -316,7 +317,7 @@ test_expect_success '--continue tries to commit' '
 '
 
 test_expect_success 'verbose flag is heeded, even after --continue' '
-       git reset --hard HEAD@{1} &&
+       git reset --hard master@{1} &&
        test_tick &&
        test_must_fail git rebase -v -i --onto new-branch1 HEAD^ &&
        echo resolved > file1 &&
@@ -647,6 +648,7 @@ test_expect_success 'rebase -i can copy notes' '
 
 cat >expect <<EOF
 an earlier note
+
 a note
 EOF