Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-22 02:03:15 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-22 02:03:15 +0300
commit57f28f40943c077ef1dc11c693d693b1bd6b7f2f (patch)
tree635b6b07251371c7cac312e6596bac5a43940859 /t
parent5a4069a1d86d98e3ba3f6aa748b5ad323983c420 (diff)
parent434e0636db102cd89292ea28e8e947fa6e790b23 (diff)
Merge branch 'en/rebase-x-wo-git-dir-env'
"git rebase -x" by mistake started exporting the GIT_DIR and GIT_WORK_TREE environment variables when the command was rewritten in C, which has been corrected. * en/rebase-x-wo-git-dir-env: sequencer: do not export GIT_DIR and GIT_WORK_TREE for 'exec'
Diffstat (limited to 't')
-rwxr-xr-xt/t3409-rebase-environ.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t3409-rebase-environ.sh b/t/t3409-rebase-environ.sh
new file mode 100755
index 0000000000..83ffb39d9f
--- /dev/null
+++ b/t/t3409-rebase-environ.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+test_description='git rebase interactive environment'
+
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+ test_commit one &&
+ test_commit two &&
+ test_commit three
+'
+
+test_expect_success 'rebase --exec does not muck with GIT_DIR' '
+ git rebase --exec "printf %s \$GIT_DIR >environ" HEAD~1 &&
+ test_must_be_empty environ
+'
+
+test_expect_success 'rebase --exec does not muck with GIT_WORK_TREE' '
+ git rebase --exec "printf %s \$GIT_WORK_TREE >environ" HEAD~1 &&
+ test_must_be_empty environ
+'
+
+test_done