Re: [RFC PATCH 2/4] rename all *_sha1 variables and make null_oid hash aware

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

 



On Mon, Oct 11, 2021 at 8:18 AM Carlo Marcelo Arenas Belón
<carenas@xxxxxxxxx> wrote:
> Before this change, creating a branch in an SHA-256 repository would
> fail because the null_sha1 used was of the wrong size.
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx>
> ---
> diff --git a/git-gui.sh b/git-gui.sh
> @@ -1820,10 +1820,14 @@ proc short_path {path} {
> +if { [get_config extensions.objectformat] eq "sha256" } {
> +       set null_oid [string repeat 0 64]
> +} else {
> +       set null_oid [string repeat 0 40]
> +}

Should this be using:

    git rev-parse --show-object-format

rather than reading the configuration directly?



[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