]> git.ipfire.org Git - thirdparty/git.git/commit
gitk: Add support of SHA256 repositories
authorTakashi Iwai <tiwai@suse.de>
Tue, 17 Jun 2025 05:59:54 +0000 (07:59 +0200)
committerJohannes Sixt <j6t@kdbg.org>
Mon, 14 Jul 2025 16:53:52 +0000 (18:53 +0200)
commit59a3998252a8f7b452e8fd60b32f5a5e639b0600
tree6f7f8c10c72c22f72590acb103d8ccf7d609d3b5
parent4a6cc6a20eeb593f1ad0f60475a9867532d7c5d5
gitk: Add support of SHA256 repositories

This patch adds a basic support of SHA256 Git repository to Gitk, so
that Gitk can show and operate on both SHA1 and SHA256 repos
gracefully.  Since SHA256 has a longer ID length (64 char) than SHA1
(40 char), many field widths are adjusted to fit with it.

A caveat is that the configuration of auto selection length is shared
between SHA1 and SHA256 repos.  That is, once when this value is saved
and read, it's applied to both repo types, which may result in shorter
selection than the full SHA256 ID.  We may introduce another
individual config for sha256 (actually I did write in the first
version), but for simplicity, the common config is used as of writing
this.

Many lines still refer "sha1" although they may point to both SHA1 and
SHA256.  They are left untouched for making the changes simpler.

This patch is based on the early work by Rostislav Krasny:
  https://patchwork.kernel.org/project/git/patch/pull.979.git.1623687519832.gitgitgadget@gmail.com
I refreshed, revised and extended to the latest state.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
gitk