Re: [PATCH 1/2] t7503: use write_script to generate hook scripts
- From
Jeff King <peff@peff.net>
- Date
- Nov 26, 2014, 04:51 UTC
- Message-ID
- <20141126045127.GC15252@peff.net>
- In-Reply-To
- <78f25aaa60554f7e3b917c565df0f89fb9c08921.1416955873.git.oystwa@gmail.com>
On Tue, Nov 25, 2014 at 11:51:28PM +0100, Øystein Walle wrote:
Show 16 quoted lines
> 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
While you are touching this line, please make it "<<\EOF". It does not matter for these simple cases, but as a style, we try to avoid interpolation unless it is necessary.
-Peff