I'm writing post-receive hook basing on the post-receive-email
script from the contrib
dir, but it seems that the oldrev
and newrev
arguments are empty.
The script looks like this:
#!/bin/bash
oldrev=$(git rev-parse $1)
newrev=$(git rev-parse $2)
The script runs on push, but all $1
, $2
, $oldrev
and $newrev
are empty. Should I configure something to get it running?
(The repository was created by gitolite
if it does matter)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…