aboutsummaryrefslogtreecommitdiffhomepage
path: root/spec/fixtures/test.git/git/hooks/pre-receive.sample
diff options
context:
space:
mode:
authorPaul Bonaud <paul.bonaud@fretlink.com>2019-04-13 16:38:04 +0200
committerPaul Bonaud <paul.bonaud@fretlink.com>2019-04-13 16:38:04 +0200
commit9c1df04756bd900c1ab61e98526ad6eaac8a7216 (patch)
treecf4048303525aa090d00d7a4a2977377cb6a99d1 /spec/fixtures/test.git/git/hooks/pre-receive.sample
parent83414e23d7f03a7a939655f51b81c0792fff616a (diff)
downloadpronto-hlint-9c1df04756bd900c1ab61e98526ad6eaac8a7216.tar.gz
pronto-hlint-9c1df04756bd900c1ab61e98526ad6eaac8a7216.tar.zst
pronto-hlint-9c1df04756bd900c1ab61e98526ad6eaac8a7216.zip
Welcom pronto-hlint! This is a whole rewrite of pronto-eslint_npm.
Forking the pronto-eslint_npm repository to build a runner for hlint haskell linter.
Diffstat (limited to 'spec/fixtures/test.git/git/hooks/pre-receive.sample')
-rwxr-xr-xspec/fixtures/test.git/git/hooks/pre-receive.sample24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/fixtures/test.git/git/hooks/pre-receive.sample b/spec/fixtures/test.git/git/hooks/pre-receive.sample
new file mode 100755
index 0000000..a1fd29e
--- /dev/null
+++ b/spec/fixtures/test.git/git/hooks/pre-receive.sample
@@ -0,0 +1,24 @@
1#!/bin/sh
2#
3# An example hook script to make use of push options.
4# The example simply echoes all push options that start with 'echoback='
5# and rejects all pushes when the "reject" push option is used.
6#
7# To enable this hook, rename this file to "pre-receive".
8
9if test -n "$GIT_PUSH_OPTION_COUNT"
10then
11 i=0
12 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
13 do
14 eval "value=\$GIT_PUSH_OPTION_$i"
15 case "$value" in
16 echoback=*)
17 echo "echo from the pre-receive-hook: ${value#*=}" >&2
18 ;;
19 reject)
20 exit 1
21 esac
22 i=$((i + 1))
23 done
24fi