summaryrefslogtreecommitdiffstats
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-23 00:45:09 +0200
committerJunio C Hamano <gitster@pobox.com>2016-04-23 00:45:09 +0200
commit2416803b6cea2bc56ea29fe767a916572f2fc89e (patch)
treec545e8745088029c1e93f7df9f2e339e5892506c /t/t3404-rebase-interactive.sh
parentMerge branch 'jk/do-not-printf-NULL' (diff)
parentt3404: use write_script (diff)
downloadgit-2416803b6cea2bc56ea29fe767a916572f2fc89e.tar.xz
git-2416803b6cea2bc56ea29fe767a916572f2fc89e.zip
Merge branch 'jk/use-write-script-more'
Code clean-up. * jk/use-write-script-more: t3404: use write_script t1020: do not overuse printf and use write_script t5532: use write_script
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index b79f442acf..d96d0e4c9b 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -555,10 +555,9 @@ test_expect_success 'rebase a detached HEAD' '
test_expect_success 'rebase a commit violating pre-commit' '
mkdir -p .git/hooks &&
- PRE_COMMIT=.git/hooks/pre-commit &&
- echo "#!/bin/sh" > $PRE_COMMIT &&
- echo "test -z \"\$(git diff --cached --check)\"" >> $PRE_COMMIT &&
- chmod a+x $PRE_COMMIT &&
+ write_script .git/hooks/pre-commit <<-\EOF &&
+ test -z "$(git diff --cached --check)"
+ EOF
echo "monde! " >> file1 &&
test_tick &&
test_must_fail git commit -m doesnt-verify file1 &&