From: Denton Liu Date: Wed, 23 Sep 2020 09:38:44 +0000 (-0700) Subject: hooks--pre-push.sample: use hash-agnostic zero OID X-Git-Tag: v2.29.0-rc0~36^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c7e5059506c6840bfbd4dd8d1730784a5689719;p=thirdparty%2Fgit.git 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 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