Git development
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Tanga Joris <tangajoris@gmail.com>
Cc: shrimech <eddinen77@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v1] hash: handle invalid algorithms when formatting object IDs
Date: Mon, 9 Nov 2026 22:45:49 +0000	[thread overview]
Message-ID: <avJNHSZLiZVffCjJ@fruit.crustytoothpaste.net> (raw)
In-Reply-To: <CAKrRMNqBCiH06xsre-YafBJiqPTiBgPnNZ3xPrhjTQWU3czwHg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

On 2026-11-07 at 20:22:01, Tanga Joris wrote:
> Hi brian,

Hey,

> > This is not a valid configuration.  I have a patch on my sha256-interop
> > branch, 5b208e4a3d34ffba0fbeafe991643d6d47a5caa0, that should make the
> > members not public.  It depends partially on things other in that
> > series, but it should be fine to drop those pieces if you want to pick
> > that up and send it in.
> >
> > If you pass the structure from C, it's intended that it panics if algo
> > is zero.  That's because we don't want to rely on the behaviour of
> > depending on a mutable global in Rust, since that's unsafe and leads to
> > action at a distance.  We really should just drop that fallback and fix
> > all of the relevant callers at some point.
> 
> That makes sense. I didn't know algo 0 coming from C is meant to
> panic in Rust, rather than depend on the default hash.
> 
> Since this is shrimech's thread, I think shrimech could pick up
> 5b208e4a3d (making the ObjectID members private), and I'd be happy
> to review it.
> 
> Could you also push 5b208e4a3d somewhere public? I could not fetch
> it from https://github.com/bk2204/git, whose sha256-interop branch
> seems to have an older version (c38d0c8475, "rust: don't expose the
> internals of ObjectID"). That would make it easier for shrimech to
> pick up.

Yeah, it's in the history of the temp-sha256-interop branch there.
-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Speaking for myself only

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 325 bytes --]

  reply	other threads:[~2026-11-09 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  4:37 [PATCH v1] hash: handle invalid algorithms when formatting object IDs shrimech
2026-11-05 14:47 ` Tanga Joris
2026-11-06  0:03   ` brian m. carlson
2026-11-07 20:22     ` Tanga Joris
2026-11-09 22:45       ` brian m. carlson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-03  4:20 shrimech

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

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

  git send-email \
    --in-reply-to=avJNHSZLiZVffCjJ@fruit.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=eddinen77@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tangajoris@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox