From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Paul Mackerras <paulus@ozlabs.org>,
Rostislav Krasny via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Rostislav Krasny <rosti.bsd@gmail.com>
Subject: Re: [PATCH] Add a basic support of SHA256 repositories into Gitk
Date: Wed, 16 Jun 2021 16:19:57 +0200 [thread overview]
Message-ID: <87h7hxyjkv.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqwnqutx6o.fsf@gitster.g>
On Wed, Jun 16 2021, Junio C Hamano wrote:
> "Rostislav Krasny via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: Rostislav Krasny <rosti.bsd@gmail.com>
>>
>> Signed-off-by: Rostislav Krasny <rosti.bsd@gmail.com>
>> ---
>> gitk: Add a basic support of SHA256 repositories into Gitk
>
> Looping-in the gitk maintainer.
>
>> This PR makes Gitk working on both SHA256 and SHA1 repositories without
>> errors/crashes. I made it by changing and testing the gitk script of Git
>> for Windows [https://gitforwindows.org/] version 2.32.0.windows.1 that
>> is a little bit different than the mainstream 2.32.0 version.
>>
>> Still not fixed functionality: [1] There is the "Auto-select SHA1
>> (length)" configuration preference that affects "Copy commit reference"
>> on both SHA1 and SHA256 repositories.
>>
>> A new "Auto-select SHA256 (length)" configuration preference should be
>> added and used on SHA256 repositories instead of the old one. Since I'm
>> not familiar with Tcl/Tk and this issue isn't critical I didn't
>> implement it.
>
> Thanks, Rostislav; please follow Documentation/SubmittingPatches
> next time you touch gitk (or git-gui), as they have their own
> repositories and maintainers.
A comment on the patch at large: I realize that the author isn't
familiar with Tcl, and this is a minimal & immediate fix, so maybe we
should just take it.
But I wonder if this == 40 or == 64 shouldn't just be "accept either" in
this case, these all seem like cases where we disambiguate a hash from
some other name.
Doing so would be nicely forward-compatible in case gitk and others ever
need to deal with viewing a mixed set of hashes, or maybe I'm again
misrecalling the transition plan and that'll never happen (they'll
always be translated?).
Especially stuff like this (grabbing a bit to quote from the patch):
>> - if {[regexp {^[0-9a-f]{4,39}$} $id]} {
>> + if {[regexp [string map "@@ [expr $hashlength - 1]" {^[0-9a-f]{4,@@}$}] $id]} {
Would be simpler as just:
if {[regexp {^[0-9a-f]{4,63}$} $id]} {
next prev parent reply other threads:[~2021-06-16 14:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 16:18 [PATCH] Add a basic support of SHA256 repositories into Gitk Rostislav Krasny via GitGitGadget
2021-06-16 1:28 ` Junio C Hamano
2021-06-16 14:19 ` Ævar Arnfjörð Bjarmason [this message]
2021-06-19 0:56 ` Felipe Contreras
2022-05-02 14:24 ` Rostislav Krasny
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=87h7hxyjkv.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=paulus@ozlabs.org \
--cc=rosti.bsd@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;
as well as URLs for NNTP newsgroup(s).