gitolite/hooks/common/gl-pre-git.hub-sample
Sitaram Chamarty 396bfaa3b9 gl-auth now checks for and run a hook called 'gl-pre-git'
see sample code for motivation; other uses at your discretion
2011-03-05 12:23:17 +05:30

11 lines
290 B
Bash

#!/bin/bash
# sample pre-git hook to print pending hub requests
[ "$1" = "R" ] && exit 0 # we only want to print them on pushes
# print 'fetched' and 'pending' requests only
SSH_ORIGINAL_COMMAND="hub list-requests $GL_REPO fetched pending" $GL_BINDIR/gl-auth-command $GL_USER
exit 0