git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Cc: Git List <git@vger.kernel.org>,
	angavrilov@gmail.com, Pratyush Yadav <me@yadavpratyush.com>
Subject: Re: [RFC PATCH 2/4] rename all *_sha1 variables and make null_oid hash aware
Date: Mon, 11 Oct 2021 16:07:40 -0400	[thread overview]
Message-ID: <CAPig+cSJentAiOGhqKpgZgXDW9NAK3OMHhKyn6auYN7b=Vk74w@mail.gmail.com> (raw)
In-Reply-To: <20211011121757.627-3-carenas@gmail.com>

On Mon, Oct 11, 2021 at 8:18 AM Carlo Marcelo Arenas Belón
<carenas@gmail.com> 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@gmail.com>
> ---
> 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?

  reply	other threads:[~2021-10-11 20:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 12:17 [RFC PATCH 0/4] git-gui: support SHA-256 repositories Carlo Marcelo Arenas Belón
2021-10-11 12:17 ` [RFC PATCH 1/4] blame: prefer null_sha1 over nullid and retire later Carlo Marcelo Arenas Belón
2021-10-27 19:43   ` Pratyush Yadav
2021-10-11 12:17 ` [RFC PATCH 2/4] rename all *_sha1 variables and make null_oid hash aware Carlo Marcelo Arenas Belón
2021-10-11 20:07   ` Eric Sunshine [this message]
2021-11-13  6:54   ` Pratyush Yadav
2021-10-11 12:17 ` [RFC PATCH 3/4] expand regexp matching an oid to be hash agnostic Carlo Marcelo Arenas Belón
2021-11-13  7:55   ` Pratyush Yadav
2021-10-11 12:17 ` [RFC PATCH 4/4] track oid_size to allow for checks that are " Carlo Marcelo Arenas Belón
2021-11-13  8:04   ` Pratyush Yadav
2021-11-13  8:10     ` Pratyush Yadav
2021-10-11 14:15 ` [RFC PATCH 0/4] git-gui: support SHA-256 repositories Ævar Arnfjörð Bjarmason
2021-10-11 19:47   ` Carlo Arenas
2021-11-13  8:08 ` Pratyush Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cSJentAiOGhqKpgZgXDW9NAK3OMHhKyn6auYN7b=Vk74w@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=angavrilov@gmail.com \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=me@yadavpratyush.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).