this is testing

Committer:
pmallick
Date:
Thu Jan 14 19:12:57 2021 +0530
Revision:
0:e8a1ba50c46b
this is testing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pmallick 0:e8a1ba50c46b 1 #!/bin/sh
pmallick 0:e8a1ba50c46b 2 #
pmallick 0:e8a1ba50c46b 3 # An example hook script to make use of push options.
pmallick 0:e8a1ba50c46b 4 # The example simply echoes all push options that start with 'echoback='
pmallick 0:e8a1ba50c46b 5 # and rejects all pushes when the "reject" push option is used.
pmallick 0:e8a1ba50c46b 6 #
pmallick 0:e8a1ba50c46b 7 # To enable this hook, rename this file to "pre-receive".
pmallick 0:e8a1ba50c46b 8
pmallick 0:e8a1ba50c46b 9 if test -n "$GIT_PUSH_OPTION_COUNT"
pmallick 0:e8a1ba50c46b 10 then
pmallick 0:e8a1ba50c46b 11 i=0
pmallick 0:e8a1ba50c46b 12 while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
pmallick 0:e8a1ba50c46b 13 do
pmallick 0:e8a1ba50c46b 14 eval "value=\$GIT_PUSH_OPTION_$i"
pmallick 0:e8a1ba50c46b 15 case "$value" in
pmallick 0:e8a1ba50c46b 16 echoback=*)
pmallick 0:e8a1ba50c46b 17 echo "echo from the pre-receive-hook: ${value#*=}" >&2
pmallick 0:e8a1ba50c46b 18 ;;
pmallick 0:e8a1ba50c46b 19 reject)
pmallick 0:e8a1ba50c46b 20 exit 1
pmallick 0:e8a1ba50c46b 21 esac
pmallick 0:e8a1ba50c46b 22 i=$((i + 1))
pmallick 0:e8a1ba50c46b 23 done
pmallick 0:e8a1ba50c46b 24 fi