Merge branch 'jk/banned-function'
[gitweb.git] / t / t3404-rebase-interactive.sh
index 46657ceadd257b4603e5783c02d7879af4e8f3d6..640fddc9c3903ba660d99b59a382d413706f7790 100755 (executable)
@@ -119,6 +119,15 @@ test_expect_success 'rebase -i with exec allows git commands in subdirs' '
        )
 '
 
+test_expect_success 'rebase -i sets work tree properly' '
+       test_when_finished "rm -rf subdir" &&
+       test_when_finished "test_might_fail git rebase --abort" &&
+       mkdir subdir &&
+       git rebase -x "(cd subdir && git rev-parse --show-toplevel)" HEAD^ \
+               >actual &&
+       ! grep "/subdir$" actual
+'
+
 test_expect_success 'rebase -i with the exec command checks tree cleanness' '
        git checkout master &&
        set_fake_editor &&