t3404: fix use of "VAR=VAL cmd" with a shell function

Bash may take it happily but running test with dash reveals a breakage. This was not discovered for a long time as no tests after this test depended on GIT_AUTHOR_NAME to be reverted correctly back to the original value after this step is done. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jul 12, 2018 at 13:07 UTC 650161a27782fe545dfe0efcb1ad971c1aebc8de
1 file changed +8 -1
t/t3404-rebase-interactive.sh
+8 -1
@@ -256,11 +256,18 @@ test_expect_success 'retain authorship' '
256 '
257
258 test_expect_success 'retain authorship w/ conflicts' '
259 + oGIT_AUTHOR_NAME=$GIT_AUTHOR_NAME &&
260 + test_when_finished "GIT_AUTHOR_NAME=\$oGIT_AUTHOR_NAME" &&
261 +
262 git reset --hard twerp &&
263 test_commit a conflict a conflict-a &&
264 git reset --hard twerp &&
262 - GIT_AUTHOR_NAME=AttributeMe \
265 +
266 + GIT_AUTHOR_NAME=AttributeMe &&
267 + export GIT_AUTHOR_NAME &&
268 test_commit b conflict b conflict-b &&
269 + GIT_AUTHOR_NAME=$oGIT_AUTHOR_NAME &&
270 +
271 set_fake_editor &&
272 test_must_fail git rebase -i conflict-a &&
273 echo resolved >conflict &&