Merge branch 'jc/t3404-one-shot-export-fix' into es/test-lint-one-shot-export
authorJunio C Hamano <gitster@pobox.com>
Mon, 16 Jul 2018 21:54:55 +0000 (14:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jul 2018 21:54:55 +0000 (14:54 -0700)
* jc/t3404-one-shot-export-fix:
t3404: fix use of "VAR=VAL cmd" with a shell function

t/t3404-rebase-interactive.sh
index 352a52e59d1a25d6fe50c5001ba3c84e2fc4a30c..449401e859a2e7205b10b2a765b4be7b4848db09 100755 (executable)
@@ -264,11 +264,18 @@ test_expect_success 'retain authorship' '
 '
 
 test_expect_success 'retain authorship w/ conflicts' '
+       oGIT_AUTHOR_NAME=$GIT_AUTHOR_NAME &&
+       test_when_finished "GIT_AUTHOR_NAME=\$oGIT_AUTHOR_NAME" &&
+
        git reset --hard twerp &&
        test_commit a conflict a conflict-a &&
        git reset --hard twerp &&
-       GIT_AUTHOR_NAME=AttributeMe \
+
+       GIT_AUTHOR_NAME=AttributeMe &&
+       export GIT_AUTHOR_NAME &&
        test_commit b conflict b conflict-b &&
+       GIT_AUTHOR_NAME=$oGIT_AUTHOR_NAME &&
+
        set_fake_editor &&
        test_must_fail git rebase -i conflict-a &&
        echo resolved >conflict &&