diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-02 15:30:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-02 15:30:45 -0700 |
commit | cd3f067815d145e284369d1bfc4fa16aec8d8eab (patch) | |
tree | 5555cc085a70471571f4a442e7af63b900b56543 /t/t3404-rebase-interactive.sh | |
parent | Merge branch 'en/t7405-recursive-submodule-conflicts' (diff) | |
parent | sequencer: pass absolute GIT_WORK_TREE to exec commands (diff) | |
download | tgif-cd3f067815d145e284369d1bfc4fa16aec8d8eab.tar.xz |
Merge branch 'bc/sequencer-export-work-tree-as-well'
"git rebase" started exporting GIT_DIR environment variable and
exposing it to hook scripts when part of it got rewritten in C.
Instead of matching the old scripted Porcelains' behaviour,
compensate by also exporting GIT_WORK_TREE environment as well to
lessen the damage. This can harm existing hooks that want to
operate on different repository, but the current behaviour is
already broken for them anyway.
* bc/sequencer-export-work-tree-as-well:
sequencer: pass absolute GIT_WORK_TREE to exec commands
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 46657ceadd..640fddc9c3 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -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 && |