[PATCH v3 3/5] commit test: Use write_script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use write_script from t/test-lib-functions instead of cat, shebang, and
chmod.

Signed-off-by: Caleb Thompson <caleb@xxxxxxxxxxxxxxxx>
---
 t/t7507-commit-verbose.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh
index 3b06d73..e62d921 100755
--- a/t/t7507-commit-verbose.sh
+++ b/t/t7507-commit-verbose.sh
@@ -3,11 +3,9 @@
 test_description='verbose commit template'
 . ./test-lib.sh
 
-cat >check-for-diff <<EOF
-#!$SHELL_PATH
-exec grep '^diff --git' "\$1"
+write_script check-for-diff <<-EOF
+	exec grep '^diff --git' "\$1"
 EOF
-chmod +x check-for-diff
 test_set_editor "$(pwd)/check-for-diff"
 
 cat >message <<'EOF'
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]