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 --- templates/hooks--pre-push.sample | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/hooks--pre-push.sample') 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