diff --git a/templates/hooks--pre-push.sample b/templates/hooks--pre-push.sample index 6187dbf439..4ce688d32b 100755 --- a/templates/hooks--pre-push.sample +++ b/templates/hooks--pre-push.sample @@ -14,7 +14,7 @@ # Information about the commits which are being pushed is supplied as lines to # the standard input in the form: # -# +# # # This sample shows how to prevent push of commits where the log message starts # with "WIP" (work in progress). @@ -22,27 +22,27 @@ remote="$1" url="$2" -z40=0000000000000000000000000000000000000000 +zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" exit 1 diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample index 5014c4b31c..c4d426bc6e 100755 --- a/templates/hooks--update.sample +++ b/templates/hooks--update.sample @@ -60,7 +60,7 @@ esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. -zero="0000000000000000000000000000000000000000" +zero=$(git hash-object --stdin