From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com>
To: "Junio C Hamano" <gitster@pobox•com>,
"brian m. carlson" <sandals@crustytoothpaste•net>
Cc: "Okhuomon Ajayi" <okhuomonajayi54@gmail•com>, git@vger•kernel.org
Subject: Re: [PATCH] [PATCH] [Outreachy] builtin/patch-id.c: clarify SHA1 usage for patch IDs
Date: Wed, 15 Oct 2025 15:59:00 +0200 [thread overview]
Message-ID: <0ebb19d7-b8a5-4792-841f-fa5a6b9c4d63@app.fastmail.com> (raw)
In-Reply-To: <xmqqbjm8waki.fsf@gitster.g>
On Wed, Oct 15, 2025, at 15:37, Junio C Hamano wrote:
> "brian m. carlson" <sandals@crustytoothpaste•net> writes:
>
>> Given that context, I think allowing the specification of an algorithm
>> would allow people to say, "Yes, I am in a SHA-256 repository, but I
>> want SHA-1," or vice versa, which would work with your use case better.
>
> That is sensible.
>
> In short, the automatic choice is to use the repository's hash
> inside a repository, or use the then-default algorithm (which comes
> from the preimage of the patch we discussed in this thread) outside
> a repository. We want a "Use this hash algorithm, ignoring the
> automatic choice" command line option that overrides it.
>
> If we were to do configuration variables, we may need two. One to
> replace only the fallback part (i.e. outside a repository, instead
> of using whatever then-current algorithm, use this one), and the
> other to act as if the above command line option is always given.
I’ve been wondering. Why does a command which in my impression is only
useful for scripting have configuration variables? Shouldn’t plumbing
commands in general avoid that since they can end up relying on
configuration state if they end up in scripts?
I want `--stable` so I always try to use that, not the corresponding
configuration variable.
>
> But as always, starting with only a command line option would be a
> prudent way forward.
>
> Thanks.
prev parent reply other threads:[~2025-10-15 13:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 17:46 [PATCH] [PATCH] [Outreachy] builtin/patch-id.c: clarify SHA1 usage for patch IDs Okhuomon Ajayi
2025-10-14 3:00 ` Junio C Hamano
2025-10-14 8:04 ` Okhuomon Ajayi
2025-10-14 21:18 ` brian m. carlson
2025-10-14 22:29 ` Junio C Hamano
2025-10-14 22:49 ` brian m. carlson
2025-10-14 23:27 ` Okhuomon Ajayi
2025-10-15 13:37 ` Junio C Hamano
2025-10-15 13:59 ` Kristoffer Haugsbakk [this message]
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=0ebb19d7-b8a5-4792-841f-fa5a6b9c4d63@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=okhuomonajayi54@gmail$(echo .)com \
--cc=sandals@crustytoothpaste$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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