From: "Øystein Walle" <oystwa@gmail.com>
To: git@vger.kernel.org
Cc: "Øystein Walle" <oystwa@gmail.com>
Subject: [PATCH 1/2] t7503: use write_script to generate hook scripts
Date: Tue, 25 Nov 2014 23:51:28 +0100 [thread overview]
Message-ID: <78f25aaa60554f7e3b917c565df0f89fb9c08921.1416955873.git.oystwa@gmail.com> (raw)
In-Reply-To: <cover.1416953772.git.oystwa@gmail.com>
In-Reply-To: <cover.1416955873.git.oystwa@gmail.com>
Signed-off-by: Øystein Walle <oystwa@gmail.com>
---
t/t7503-pre-commit-hook.sh | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/t/t7503-pre-commit-hook.sh b/t/t7503-pre-commit-hook.sh
index 984889b..99ed967 100755
--- a/t/t7503-pre-commit-hook.sh
+++ b/t/t7503-pre-commit-hook.sh
@@ -24,8 +24,7 @@ test_expect_success '--no-verify with no hook' '
HOOKDIR="$(git rev-parse --git-dir)/hooks"
HOOK="$HOOKDIR/pre-commit"
mkdir -p "$HOOKDIR"
-cat > "$HOOK" <<EOF
-#!/bin/sh
+write_script "$HOOK" <<EOF
exit 0
EOF
chmod +x "$HOOK"
@@ -47,8 +46,7 @@ test_expect_success '--no-verify with succeeding hook' '
'
# now a hook that fails
-cat > "$HOOK" <<EOF
-#!/bin/sh
+write_script "$HOOK" <<EOF
exit 1
EOF
@@ -88,8 +86,7 @@ chmod +x "$HOOK"
# a hook that checks $GIT_PREFIX and succeeds inside the
# success/ subdirectory only
-cat > "$HOOK" <<EOF
-#!/bin/sh
+write_script "$HOOK" <<EOF
test \$GIT_PREFIX = success/
EOF
--
2.2.0.rc3
next prev parent reply other threads:[~2014-11-25 22:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 22:51 [PATCH 0/2] pre-commit hook updates Øystein Walle
[not found] ` <cover.1416955873.git.oystwa@gmail.com>
2014-11-25 22:51 ` Øystein Walle [this message]
2014-11-26 1:25 ` [PATCH 1/2] t7503: use write_script to generate hook scripts Eric Sunshine
2014-11-26 4:51 ` Jeff King
2014-11-26 18:12 ` Junio C Hamano
2014-11-26 19:03 ` Jeff King
2014-11-26 20:07 ` Junio C Hamano
2014-11-25 22:51 ` [PATCH 2/2] commit: inform pre-commit that --amend was used Øystein Walle
2014-11-26 1:36 ` Eric Sunshine
2014-11-26 1:32 ` [PATCH 0/2] pre-commit hook updates Eric Sunshine
2014-11-26 4:52 ` Jeff King
2014-11-26 18:35 ` Junio C Hamano
2014-11-26 18:56 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78f25aaa60554f7e3b917c565df0f89fb9c08921.1416955873.git.oystwa@gmail.com \
--to=oystwa@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).