Subject: Re: [PATCH 2/2] gitk: Add auto-select length preference for SHA256

From: Takashi Iwai <[email-masked]>
Date: Mon, 12 May 2025 16:36:44 +0200

On Thu, 08 May 2025 08:20:57 +0200,
Johannes Sixt wrote:
> 
> Am 20.03.25 um 16:41 schrieb Takashi Iwai:
> > This implements the missing preference setup of the auto select length
> > for SHA256. The variable set via the preference menu is switched
> > depending on the hash algorithm.
> > 
> > The default auto-select length is set to 64 for SHA256, and
> > saved/restored as "autosellensha256" in the config.
> 
> I think the purpose of this change is to offer different settings for
> the selected length depending on the hash algorithm. If that is the
> case, the commit message could do a better job describing that: it says
> only what happens implementationwise, but not what the user sees.

Sure, I can rephrase.  Could you suggest a better text example?

> I do not think this is necessary. If I had set the option to, say, 12, I
> would not want it to be set to something else when I go to a repository
> that has a different hash algorithm.

The problem is that a value 40 is used always as default even for
SHA256.  So, without this change, the selection looks always shorter
than the full ID unless you explicitly change this option in the
configuration menu.  That sucks.

> (But I do not know for certain,
> because I do not have any SHA256 repositories, yet.)

You can find SHA256 git repos in src.opensuse.org, where we started
hitting the problems with gitk :)
For example, one of my repos below is very small:
  https://src.opensuse.org/kernel-firmware/kernel-firmware-all

thanks,

Takashi