On Tue, Nov 25, 2014 at 5:51 PM, Øystein Walle <oystwa@xxxxxxxxx> wrote: > Signed-off-by: Øystein Walle <oystwa@xxxxxxxxx> > --- > 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" You can drop the 'chmod' too since write_script does that for you. > @@ -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 -- 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