summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/hooks--pre-push.sample6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/hooks--pre-push.sample b/templates/hooks--pre-push.sample
index d0f30190ac..4ce688d32b 100755
--- a/templates/hooks--pre-push.sample
+++ b/templates/hooks--pre-push.sample
@@ -22,16 +22,16 @@
remote="$1"
url="$2"
-z40=0000000000000000000000000000000000000000
+zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
while read local_ref local_oid remote_ref remote_oid
do
- if test "$local_oid" = $z40
+ if test "$local_oid" = "$zero"
then
# Handle delete
:
else
- if test "$remote_oid" = $z40
+ if test "$remote_oid" = "$zero"
then
# New branch, examine all commits
range="$local_oid"