Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t3404: fix use of "VAR=VAL cmd" with a shell function
author
Junio C Hamano
<gitster@pobox.com>
Thu, 12 Jul 2018 20:07:51 +0000
(13:07 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 12 Jul 2018 20:31:57 +0000
(13:31 -0700)
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>
t/t3404-rebase-interactive.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a42a58d
)
diff --git
a/t/t3404-rebase-interactive.sh
b/t/t3404-rebase-interactive.sh
index 481a3500900d0fccb28762ba24b2ca422956a44f..489b6196e0748997f0e06ff36bf07a6e0a1de4e5 100755
(executable)
--- a/
t/t3404-rebase-interactive.sh
+++ b/
t/t3404-rebase-interactive.sh
@@
-256,11
+256,18
@@
test_expect_success 'retain authorship' '
'
test_expect_success 'retain authorship w/ conflicts' '
'
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 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 &&
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 &&
set_fake_editor &&
test_must_fail git rebase -i conflict-a &&
echo resolved >conflict &&