From 8c7e5059506c6840bfbd4dd8d1730784a5689719 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Wed, 23 Sep 2020 02:38:44 -0700 Subject: hooks--pre-push.sample: use hash-agnostic zero OID The pre-push sample hook has the zero OID hardcoded as 40 zeros. However, with the introduction of SHA-256 support, this assumption no longer holds true. Replace the hardcoded $z40 with a call to git hash-object --stdin Signed-off-by: Junio C Hamano diff --git a/templates/hooks--pre-push.sample b/templates/hooks--pre-push.sample index d0f3019..4ce688d 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