gl-auth now checks for and run a hook called 'gl-pre-git'

see sample code for motivation; other uses at your discretion
This commit is contained in:
Sitaram Chamarty 2011-03-04 06:44:06 +05:30
parent aab5ec9e6a
commit 396bfaa3b9
3 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#!/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