diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index 181456aa9a..ddce53a964 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -266,13 +266,10 @@ test_expect_success 'committer is automatic' ' test_i18ncmp expect actual ' -pwd=`pwd` -cat >> .git/FAKE_EDITOR << EOF -#! /bin/sh -echo editor started > "$pwd/.git/result" +write_script .git/FAKE_EDITOR < "$(pwd)/.git/result" exit 0 EOF -chmod +x .git/FAKE_EDITOR test_expect_success 'do not fire editor in the presence of conflicts' ' @@ -300,9 +297,7 @@ test_expect_success 'do not fire editor in the presence of conflicts' ' test "$(cat .git/result)" = "editor not started" ' -pwd=`pwd` -cat >.git/FAKE_EDITOR <.git/FAKE_EDITOR <"\$1" + cat "$1.orig" +) >"$1" EOF echo '## Custom template' >template