From: Denton Liu Date: Wed, 23 Sep 2020 09:38:42 GMT Subject: [PATCH v2 0/3] sample hooks: become hash agnostic Message-ID: In-Reply-To: There are currently two hooks that have hardcoded 40 zeros as the null OID and, thus, are not hash-agnostic. Rewrite these to get the zero OID using git hash-object --stdin 1: 95dd0b19ba hooks--pre-push.sample: modernize script -: ---------- > 2: afb460d9fd hooks--pre-push.sample: use hash-agnostic zero OID 4: 42d2829889 ! 3: 784135549f hooks--update.sample: use hash-agnostic null OID @@ Metadata Author: Denton Liu ## Commit message ## - hooks--update.sample: use hash-agnostic null OID + hooks--update.sample: use hash-agnostic zero OID - The update sample hook has the null OID hardcoded as 40 zeros. However, + The update 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 rev-parse --null-oid` so the sample hook becomes hash-agnostic. + + git hash-object --stdin