本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
544B

  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. if test -n "$GIT_PUSH_OPTION_COUNT"
  9. then
  10. i=0
  11. while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
  12. do
  13. eval "value=\$GIT_PUSH_OPTION_$i"
  14. case "$value" in
  15. echoback=*)
  16. echo "echo from the pre-receive-hook: ${value#*=}" >&2
  17. ;;
  18. reject)
  19. exit 1
  20. esac
  21. i=$((i + 1))
  22. done
  23. fi
上海开阖软件有限公司 沪ICP备12045867号-1