Re: [PATCH 4/4] hooks--update.sample: use hash-agnostic null OID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 18, 2020 at 7:19 AM Denton Liu <liu.denton@xxxxxxxxx> wrote:
> The update sample hook has the null 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.
>
> Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
> ---
> diff --git a/templates/hooks--update.sample b/templates/hooks--update.sample
> @@ -60,7 +60,7 @@ esac
> -zero="0000000000000000000000000000000000000000"
> +zero="$(git rev-list --null-oid)"

Definitely want a s/rev-list/rev-parse/ here.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux