sequencer: simplify adding Signed-off-by: trailer
[gitweb.git] / t / t3404-rebase-interactive.sh
index 3704dbb2ecf6046e09adb03b451e4e531509b2f4..9ed0a244e6cdf34c7caca8232f0c0a8cf4864c42 100755 (executable)
@@ -108,6 +108,17 @@ test_expect_success 'rebase -i with the exec command runs from tree root' '
        rm -fr subdir
 '
 
+test_expect_success 'rebase -i with exec allows git commands in subdirs' '
+       test_when_finished "rm -rf subdir" &&
+       test_when_finished "git rebase --abort ||:" &&
+       git checkout master &&
+       mkdir subdir && (cd subdir &&
+       set_fake_editor &&
+       FAKE_LINES="1 exec_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
+               git rebase -i HEAD^
+       )
+'
+
 test_expect_success 'rebase -i with the exec command checks tree cleanness' '
        git checkout master &&
        set_fake_editor &&
@@ -442,6 +453,10 @@ test_expect_success C_LOCALE_OUTPUT 'squash and fixup generate correct log messa
                git rebase -i $base &&
        git cat-file commit HEAD | sed -e 1,/^\$/d > actual-squash-fixup &&
        test_cmp expect-squash-fixup actual-squash-fixup &&
+       git cat-file commit HEAD@{2} |
+               grep "^# This is a combination of 3 commits\."  &&
+       git cat-file commit HEAD@{3} |
+               grep "^# This is a combination of 2 commits\."  &&
        git checkout to-be-rebased &&
        git branch -D squash-fixup
 '