Compare commits
358 Commits
Author | SHA256 | Date | |
---|---|---|---|
29c41e30f3 | |||
d282f59a19 | |||
449f6b4529 | |||
25bd9d7139 | |||
c9ef1e03d7 | |||
cc31c19dde | |||
b54fb42c5f | |||
b812e06057 | |||
c7cd65c0b5 | |||
0b3439a103 | |||
81007fc644 | |||
9e8e6a8473 | |||
919cbfe376 | |||
3242813d6e | |||
616a142099 | |||
b6b6dcc2aa | |||
135bc78bbd | |||
|
4f638d656e | ||
4e674a788f | |||
64cea07b17 | |||
483dbc7bc8 | |||
e0ea61d6e0 | |||
b80926ddde | |||
bb019d4d17 | |||
70cbbadd5f | |||
80d8bb00b4 | |||
9122a6d039 | |||
5792d0456b | |||
46e321a751 | |||
26739b1f72 | |||
96f58b36fc | |||
231671a7e8 | |||
|
84f19fcaec | ||
f064602739 | |||
608a98b3ca | |||
26915f3665 | |||
b1ec1594a6 | |||
11174bcbc2 | |||
|
36fb3f0493 | ||
8ab4ba7c73 | |||
|
5b3ce60062 | ||
|
42270f6e74 | ||
64d2aa6f24 | |||
9f3a373ebe | |||
d15e56f1d8 | |||
b945fd4818 | |||
784b009a45 | |||
f5e259626f | |||
25f2472069 | |||
ef49c50038 | |||
a549fe5183 | |||
9b7ff2676a | |||
1d6f3ef5de | |||
|
f1019b499d | ||
dc7a5937fc | |||
|
23e653e713 | ||
f9faf62fed | |||
|
b58c8f3843 | ||
9251bd89d5 | |||
|
d3e863b7c9 | ||
34a2968485 | |||
787be26c66 | |||
f672a1ae42 | |||
ea5ce516cc | |||
1bf742ba11 | |||
61bfe16c0b | |||
ebe05df5b5 | |||
|
cac22aa92d | ||
ed2ab3fb67 | |||
97fc5ccb2c | |||
a62ba7db7f | |||
ad03eb7dfc | |||
609ddbad5b | |||
16af1ee7ec | |||
504a3a3eab | |||
07a0662ed7 | |||
a5b19cceff | |||
713763acd2 | |||
7d88583a8d | |||
877a55d6a2 | |||
cbec24d713 | |||
66ec1d36b8 | |||
1cebf0890b | |||
21836f0ec6 | |||
f57085bea7 | |||
d1e1df8c3b | |||
17fafd160b | |||
d036f1fd64 | |||
226f89f2dc | |||
aa98dc27af | |||
e202ace468 | |||
6b8915c67b | |||
aec78cff84 | |||
6ee96f6fb7 | |||
54e2cafb0c | |||
b0aae38df9 | |||
de4f943096 | |||
041822fbc8 | |||
78515abc29 | |||
546eaed68e | |||
8f3b5d5077 | |||
33d3540bb4 | |||
11facd4c4b | |||
c4e59cdf0d | |||
5049141a33 | |||
869bdab7c1 | |||
|
271082f7a2 | ||
|
90972dec91 | ||
ef9abf326f | |||
0bd7615737 | |||
1e785c8ccd | |||
02b9a804d7 | |||
9c6f1d7116 | |||
d80aff298b | |||
eabb31532a | |||
0d43f42e3d | |||
3b41c635c8 | |||
7a98c83d79 | |||
3a8bbca3df | |||
72bf55c7c6 | |||
a0030f8fd4 | |||
c31a4efafb | |||
dc5cf29152 | |||
f84ac4bac5 | |||
0287eaefe0 | |||
80d91a7c80 | |||
dc5d755f72 | |||
d547c32f13 | |||
e7c139d2e6 | |||
1e4811c479 | |||
64c6816a53 | |||
d368575d01 | |||
0e16f7c550 | |||
d5980e3ad1 | |||
09b049c67a | |||
df05c6eeae | |||
937fe2e8ec | |||
|
d471f1092d | ||
e1a815f477 | |||
9c9fb96594 | |||
c502be5129 | |||
42cfc11470 | |||
c1c7775c3f | |||
98b9d6be0b | |||
3dbfce08a4 | |||
31fbf04c09 | |||
9753df24fc | |||
0a9fed604d | |||
f7bc847ca0 | |||
26c472cc4e | |||
a5f1009f43 | |||
854a9666f3 | |||
514b122f9a | |||
b6a179e197 | |||
85d3f7f9bb | |||
d159fec9d8 | |||
52561b4f80 | |||
6426de801e | |||
9769591655 | |||
7d0792e5ae | |||
890007cdfd | |||
e00a08c4dc | |||
70e32972cb | |||
651f8795b1 | |||
9fd19580e8 | |||
069d918659 | |||
8030e85820 | |||
cf4055c7b1 | |||
863c19a822 | |||
d891d26b60 | |||
b18505bb0a | |||
8b81b222a4 | |||
0b7ca2fe3a | |||
0a76183baf | |||
ae33fb39e1 | |||
bde1479acf | |||
|
f113746ab8 | ||
a082d3900f | |||
f9d8699b90 | |||
9243340946 | |||
eb2416479e | |||
d324862e99 | |||
9dd90505f2 | |||
0f4660dc2d | |||
bad11ef5e4 | |||
307b4ec983 | |||
cefc85ea56 | |||
f9de565301 | |||
c0ffa391a0 | |||
09ca0f2300 | |||
5e188f3e1e | |||
4b903492fe | |||
8c5b275bf4 | |||
9dd611351a | |||
61459da9d6 | |||
434abd9640 | |||
f9adf53b04 | |||
100449d757 | |||
4bf18b297e | |||
65364da341 | |||
52850b3274 | |||
88ee113741 | |||
f5e36d7fac | |||
d5da379ad0 | |||
|
7e1ec9ce3f | ||
2e13cf242c | |||
|
1cf734428e | ||
|
4206602985 | ||
|
3454b7cd66 | ||
53a22542d9 | |||
303412623f | |||
|
0f0aac0418 | ||
555422fa24 | |||
|
4ec9d8bb3a | ||
94fa2b88b6 | |||
eba6be1122 | |||
3fb0376b3d | |||
943538660f | |||
38e6ff3aa7 | |||
160e256286 | |||
1f811d303f | |||
5af0727b38 | |||
50df422c7a | |||
|
bcfea3d80b | ||
|
cac9871f91 | ||
|
fd650db959 | ||
|
7c9a5bbf29 | ||
|
e7c2cff8f7 | ||
|
566463c9d0 | ||
|
93daaa8716 | ||
|
fd510ea339 | ||
|
070b376530 | ||
|
a4882f4047 | ||
|
9a0a57bf85 | ||
|
f2d77d1f9f | ||
|
7da1f0aa08 | ||
|
45fcd4a429 | ||
|
5c40df9005 | ||
|
14a27b1f8d | ||
|
6b15e77a43 | ||
|
4b2e5d6b52 | ||
|
ad3b6d21b1 | ||
|
0a86e5599b | ||
|
b4cc2bc0bd | ||
|
647ae269c7 | ||
|
6a21e56e0f | ||
|
64a357bfbd | ||
|
97d7174b6a | ||
|
545f3d1c69 | ||
|
5692609702 | ||
|
42d60f2030 | ||
|
4e1cc7418f | ||
|
c92d783b2a | ||
|
89f562b4f6 | ||
|
227b6b0993 | ||
|
d986cf39ed | ||
|
8b27c41dbc | ||
|
5bb65b2fa0 | ||
|
7c0d2207a4 | ||
|
21fc25c24c | ||
|
65031f8424 | ||
|
d352499c50 | ||
|
a2b5a8f986 | ||
|
47ce656bfd | ||
|
322ab85e55 | ||
|
95721743c4 | ||
|
9baa6ab95b | ||
|
1cc213f2cb | ||
|
6dc6383e0b | ||
|
26f305b8b5 | ||
|
c3a83f62ec | ||
|
27ffe2c069 | ||
|
b341d17a88 | ||
|
3e44f27794 | ||
|
a2dcc27309 | ||
|
271c93bf6a | ||
|
1156aa787c | ||
|
0e04740f49 | ||
|
dec0b3257f | ||
|
4afba994e0 | ||
|
2536d12688 | ||
|
00664da02b | ||
|
82f444b2a5 | ||
|
7962f00cec | ||
|
10c5d9e91c | ||
|
b9da359d69 | ||
|
f4f7c8fc83 | ||
|
b9ff500b0b | ||
|
2aa79abc71 | ||
|
2280c7e936 | ||
|
c57de08c1a | ||
|
4ae94d7b96 | ||
|
743535f0b9 | ||
|
d56b631115 | ||
|
cfe759d035 | ||
|
630b9fbc08 | ||
|
6387d7d470 | ||
|
74bcfcb88f | ||
|
01f4542b84 | ||
|
b601492c3b | ||
|
70372cf3eb | ||
|
dd3d74ab32 | ||
|
081d9cb109 | ||
|
dd6d976ea2 | ||
|
24d3613e5a | ||
|
0e019c5cc5 | ||
|
d006782ce5 | ||
|
32099a294b | ||
|
fe5317faff | ||
|
50a6de56ba | ||
|
e830929ff7 | ||
|
f02777a63e | ||
|
c3cfe7cd85 | ||
|
09561a8b0a | ||
|
c17189be00 | ||
|
dad6b21528 | ||
|
bb54ee6dfc | ||
|
3dfd548265 | ||
|
d4054b6dbe | ||
|
8195db7101 | ||
|
ab92393417 | ||
|
1dae00d688 | ||
|
5d5e48649b | ||
|
68bf2b2fec | ||
|
6095018f63 | ||
|
0f1b28fe02 | ||
|
6b106de458 | ||
|
8cc047e5ef | ||
|
c26d2ddcb3 | ||
|
4e65fc4ed8 | ||
|
b6e5703b08 | ||
|
4ef162a184 | ||
|
3f42f80383 | ||
|
64e307b0d0 | ||
|
61883d9cce | ||
|
d72b3a1d5f | ||
|
c65faadf00 | ||
|
ea5447ad6e | ||
|
2623082364 | ||
|
f519bb994d | ||
|
2fde0d3347 | ||
|
ff07754de4 | ||
|
adb098b7bc | ||
|
eb452c5f12 | ||
|
83a213e077 | ||
|
2959321b6e | ||
|
2052a56aaf | ||
|
86aaceb23f | ||
|
cbdb432029 | ||
|
bd2d861f23 | ||
|
a3d6aaeb42 | ||
|
4578dc2844 | ||
|
98d8552fe3 | ||
|
7c738df833 | ||
|
e1fe49ccac | ||
|
300b1b374f | ||
|
e143e37f36 | ||
|
608be131d7 |
399
0001-gitk-Add-support-of-SHA256-repo.patch
Normal file
399
0001-gitk-Add-support-of-SHA256-repo.patch
Normal file
@@ -0,0 +1,399 @@
|
|||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Subject: [PATCH v2] gitk: Add support of SHA256 repo
|
||||||
|
Date: Tue, 17 Jun 2025 07:59:54 +0200
|
||||||
|
Message-ID: <20250617055957.9794-1-tiwai@suse.de>
|
||||||
|
|
||||||
|
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>
|
||||||
|
---
|
||||||
|
|
||||||
|
v1: https://lore.kernel.org/20250320154136.23262-1-tiwai@suse.de
|
||||||
|
v1->v2:
|
||||||
|
- Fix other procs using fixed 40 length
|
||||||
|
- Don't use tabs
|
||||||
|
- Drop autosellensha256 config
|
||||||
|
- Some code simplification
|
||||||
|
- Fix patch description
|
||||||
|
|
||||||
|
gitk-git/gitk | 83 +++++++++++++++++++++++++++++++++++----------------
|
||||||
|
1 file changed, 58 insertions(+), 25 deletions(-)
|
||||||
|
|
||||||
|
Index: git/gitk-git/gitk
|
||||||
|
===================================================================
|
||||||
|
--- git.orig/gitk-git/gitk
|
||||||
|
+++ git/gitk-git/gitk
|
||||||
|
@@ -479,6 +479,7 @@ proc parseviewargs {n arglist} {
|
||||||
|
|
||||||
|
proc parseviewrevs {view revs} {
|
||||||
|
global vposids vnegids
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
if {$revs eq {}} {
|
||||||
|
set revs HEAD
|
||||||
|
@@ -492,7 +493,7 @@ proc parseviewrevs {view revs} {
|
||||||
|
set badrev {}
|
||||||
|
for {set l 0} {$l < [llength $errlines]} {incr l} {
|
||||||
|
set line [lindex $errlines $l]
|
||||||
|
- if {!([string length $line] == 40 && [string is xdigit $line])} {
|
||||||
|
+ if {!([string length $line] == $hashlength && [string is xdigit $line])} {
|
||||||
|
if {[string match "fatal:*" $line]} {
|
||||||
|
if {[string match "fatal: ambiguous argument*" $line]
|
||||||
|
&& $badrev ne {}} {
|
||||||
|
@@ -698,6 +699,7 @@ proc updatecommits {} {
|
||||||
|
global hasworktree
|
||||||
|
global varcid vposids vnegids vflags vrevs
|
||||||
|
global show_notes
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set hasworktree [hasworktree]
|
||||||
|
rereadrefs
|
||||||
|
@@ -731,7 +733,7 @@ proc updatecommits {} {
|
||||||
|
# take out positive refs that we asked for before or
|
||||||
|
# that we have already seen
|
||||||
|
foreach rev $revs {
|
||||||
|
- if {[string length $rev] == 40} {
|
||||||
|
+ if {[string length $rev] == $hashlength} {
|
||||||
|
if {[lsearch -exact $oldpos $rev] < 0
|
||||||
|
&& ![info exists varcid($view,$rev)]} {
|
||||||
|
lappend newrevs $rev
|
||||||
|
@@ -1614,6 +1616,7 @@ proc getcommitlines {fd inst view updati
|
||||||
|
global parents children curview hlview
|
||||||
|
global idpending ordertok
|
||||||
|
global varccommits varcid varctok vtokmod vfilelimit vshortids
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set stuff [read $fd 500000]
|
||||||
|
# git log doesn't terminate the last commit with a null...
|
||||||
|
@@ -1696,7 +1699,7 @@ proc getcommitlines {fd inst view updati
|
||||||
|
}
|
||||||
|
set ok 1
|
||||||
|
foreach id $ids {
|
||||||
|
- if {[string length $id] != 40} {
|
||||||
|
+ if {[string length $id] != $hashlength} {
|
||||||
|
set ok 0
|
||||||
|
break
|
||||||
|
}
|
||||||
|
@@ -1942,8 +1945,8 @@ proc getcommit {id} {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
-# Expand an abbreviated commit ID to a list of full 40-char IDs that match
|
||||||
|
-# and are present in the current view.
|
||||||
|
+# Expand an abbreviated commit ID to a list of full 40-char (or 64-char
|
||||||
|
+# for SHA256 repo) IDs that match and are present in the current view.
|
||||||
|
# This is fairly slow...
|
||||||
|
proc longid {prefix} {
|
||||||
|
global varcid curview vshortids
|
||||||
|
@@ -1976,6 +1979,7 @@ proc readrefs {} {
|
||||||
|
global selecthead selectheadid
|
||||||
|
global hideremotes
|
||||||
|
global tclencoding
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
|
||||||
|
unset -nocomplain $v
|
||||||
|
@@ -1985,9 +1989,9 @@ proc readrefs {} {
|
||||||
|
fconfigure $refd -encoding $tclencoding
|
||||||
|
}
|
||||||
|
while {[gets $refd line] >= 0} {
|
||||||
|
- if {[string index $line 40] ne " "} continue
|
||||||
|
- set id [string range $line 0 39]
|
||||||
|
- set ref [string range $line 41 end]
|
||||||
|
+ if {[string index $line $hashlength] ne " "} continue
|
||||||
|
+ set id [string range $line 0 [expr {$hashlength - 1}]]
|
||||||
|
+ set ref [string range $line [expr {$hashlength + 1}] end]
|
||||||
|
if {![string match "refs/*" $ref]} continue
|
||||||
|
set name [string range $ref 5 end]
|
||||||
|
if {[string match "remotes/*" $name]} {
|
||||||
|
@@ -2282,6 +2286,7 @@ proc makewindow {} {
|
||||||
|
global have_tk85 have_tk86 use_ttk NS
|
||||||
|
global git_version
|
||||||
|
global worddiff
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
# The "mc" arguments here are purely so that xgettext
|
||||||
|
# sees the following string as needing to be translated
|
||||||
|
@@ -2407,7 +2412,7 @@ proc makewindow {} {
|
||||||
|
-command gotocommit -width 8
|
||||||
|
$sha1but conf -disabledforeground [$sha1but cget -foreground]
|
||||||
|
pack .tf.bar.sha1label -side left
|
||||||
|
- ${NS}::entry $sha1entry -width 40 -font textfont -textvariable sha1string
|
||||||
|
+ ${NS}::entry $sha1entry -width $hashlength -font textfont -textvariable sha1string
|
||||||
|
trace add variable sha1string write sha1change
|
||||||
|
pack $sha1entry -side left -pady 2
|
||||||
|
|
||||||
|
@@ -4132,6 +4137,7 @@ proc stopblaming {} {
|
||||||
|
|
||||||
|
proc read_line_source {fd inst} {
|
||||||
|
global blamestuff curview commfd blameinst nullid nullid2
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
while {[gets $fd line] >= 0} {
|
||||||
|
lappend blamestuff($inst) $line
|
||||||
|
@@ -4152,7 +4158,7 @@ proc read_line_source {fd inst} {
|
||||||
|
set line [split [lindex $blamestuff($inst) 0] " "]
|
||||||
|
set id [lindex $line 0]
|
||||||
|
set lnum [lindex $line 1]
|
||||||
|
- if {[string length $id] == 40 && [string is xdigit $id] &&
|
||||||
|
+ if {[string length $id] == $hashlength && [string is xdigit $id] &&
|
||||||
|
[string is digit -strict $lnum]} {
|
||||||
|
# look for "filename" line
|
||||||
|
foreach l $blamestuff($inst) {
|
||||||
|
@@ -5296,11 +5302,13 @@ proc askrelhighlight {row id} {
|
||||||
|
# Graph layout functions
|
||||||
|
|
||||||
|
proc shortids {ids} {
|
||||||
|
+ global hashlength
|
||||||
|
+
|
||||||
|
set res {}
|
||||||
|
foreach id $ids {
|
||||||
|
if {[llength $id] > 1} {
|
||||||
|
lappend res [shortids $id]
|
||||||
|
- } elseif {[regexp {^[0-9a-f]{40}$} $id]} {
|
||||||
|
+ } elseif {[regexp [string map "@@ $hashlength" {^[0-9a-f]{@@}$}] $id]} {
|
||||||
|
lappend res [string range $id 0 7]
|
||||||
|
} else {
|
||||||
|
lappend res $id
|
||||||
|
@@ -5475,13 +5483,14 @@ proc get_viewmainhead {view} {
|
||||||
|
# git rev-list should give us just 1 line to use as viewmainheadid($view)
|
||||||
|
proc getviewhead {fd inst view} {
|
||||||
|
global viewmainheadid commfd curview viewinstances showlocalchanges
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set id {}
|
||||||
|
if {[gets $fd line] < 0} {
|
||||||
|
if {![eof $fd]} {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
- } elseif {[string length $line] == 40 && [string is xdigit $line]} {
|
||||||
|
+ } elseif {[string length $line] == $hashlength && [string is xdigit $line]} {
|
||||||
|
set id $line
|
||||||
|
}
|
||||||
|
set viewmainheadid($view) $id
|
||||||
|
@@ -7245,10 +7254,11 @@ proc commit_descriptor {p} {
|
||||||
|
# Also look for URLs of the form "http[s]://..." and make them web links.
|
||||||
|
proc appendwithlinks {text tags} {
|
||||||
|
global ctext linknum curview
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set start [$ctext index "end - 1c"]
|
||||||
|
$ctext insert end $text $tags
|
||||||
|
- set links [regexp -indices -all -inline {(?:\m|-g)[0-9a-f]{6,40}\M} $text]
|
||||||
|
+ set links [regexp -indices -all -inline [string map "@@ $hashlength" {(?:\m|-g)[0-9a-f]{6,@@}\M}] $text]
|
||||||
|
foreach l $links {
|
||||||
|
set s [lindex $l 0]
|
||||||
|
set e [lindex $l 1]
|
||||||
|
@@ -7276,13 +7286,14 @@ proc appendwithlinks {text tags} {
|
||||||
|
proc setlink {id lk} {
|
||||||
|
global curview ctext pendinglinks
|
||||||
|
global linkfgcolor
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
if {[string range $id 0 1] eq "-g"} {
|
||||||
|
set id [string range $id 2 end]
|
||||||
|
}
|
||||||
|
|
||||||
|
set known 0
|
||||||
|
- if {[string length $id] < 40} {
|
||||||
|
+ if {[string length $id] < $hashlength} {
|
||||||
|
set matches [longid $id]
|
||||||
|
if {[llength $matches] > 0} {
|
||||||
|
if {[llength $matches] > 1} return
|
||||||
|
@@ -8927,13 +8938,16 @@ proc incrfont {inc} {
|
||||||
|
|
||||||
|
proc clearsha1 {} {
|
||||||
|
global sha1entry sha1string
|
||||||
|
- if {[string length $sha1string] == 40} {
|
||||||
|
+ global hashlength
|
||||||
|
+
|
||||||
|
+ if {[string length $sha1string] == $hashlength} {
|
||||||
|
$sha1entry delete 0 end
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proc sha1change {n1 n2 op} {
|
||||||
|
global sha1string currentid sha1but
|
||||||
|
+
|
||||||
|
if {$sha1string == {}
|
||||||
|
|| ([info exists currentid] && $sha1string == $currentid)} {
|
||||||
|
set state disabled
|
||||||
|
@@ -8950,6 +8964,7 @@ proc sha1change {n1 n2 op} {
|
||||||
|
|
||||||
|
proc gotocommit {} {
|
||||||
|
global sha1string tagids headids curview varcid
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
if {$sha1string == {}
|
||||||
|
|| ([info exists currentid] && $sha1string == $currentid)} return
|
||||||
|
@@ -8959,7 +8974,7 @@ proc gotocommit {} {
|
||||||
|
set id $headids($sha1string)
|
||||||
|
} else {
|
||||||
|
set id [string tolower $sha1string]
|
||||||
|
- if {[regexp {^[0-9a-f]{4,39}$} $id]} {
|
||||||
|
+ if {[regexp {^[0-9a-f]{4,63}$} $id]} {
|
||||||
|
set matches [longid $id]
|
||||||
|
if {$matches ne {}} {
|
||||||
|
if {[llength $matches] > 1} {
|
||||||
|
@@ -9446,6 +9461,7 @@ proc doseldiff {oldid newid} {
|
||||||
|
|
||||||
|
proc mkpatch {} {
|
||||||
|
global rowmenuid currentid commitinfo patchtop patchnum NS
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
if {![info exists currentid]} return
|
||||||
|
set oldid $currentid
|
||||||
|
@@ -9460,7 +9476,7 @@ proc mkpatch {} {
|
||||||
|
${NS}::label $top.title -text [mc "Generate patch"]
|
||||||
|
grid $top.title - -pady 10
|
||||||
|
${NS}::label $top.from -text [mc "From:"]
|
||||||
|
- ${NS}::entry $top.fromsha1 -width 40
|
||||||
|
+ ${NS}::entry $top.fromsha1 -width $hashlength
|
||||||
|
$top.fromsha1 insert 0 $oldid
|
||||||
|
$top.fromsha1 conf -state readonly
|
||||||
|
grid $top.from $top.fromsha1 -sticky w
|
||||||
|
@@ -9469,7 +9485,7 @@ proc mkpatch {} {
|
||||||
|
$top.fromhead conf -state readonly
|
||||||
|
grid x $top.fromhead -sticky w
|
||||||
|
${NS}::label $top.to -text [mc "To:"]
|
||||||
|
- ${NS}::entry $top.tosha1 -width 40
|
||||||
|
+ ${NS}::entry $top.tosha1 -width $hashlength
|
||||||
|
$top.tosha1 insert 0 $newid
|
||||||
|
$top.tosha1 conf -state readonly
|
||||||
|
grid $top.to $top.tosha1 -sticky w
|
||||||
|
@@ -9535,6 +9551,7 @@ proc mkpatchcan {} {
|
||||||
|
|
||||||
|
proc mktag {} {
|
||||||
|
global rowmenuid mktagtop commitinfo NS
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set top .maketag
|
||||||
|
set mktagtop $top
|
||||||
|
@@ -9544,7 +9561,7 @@ proc mktag {} {
|
||||||
|
${NS}::label $top.title -text [mc "Create tag"]
|
||||||
|
grid $top.title - -pady 10
|
||||||
|
${NS}::label $top.id -text [mc "ID:"]
|
||||||
|
- ${NS}::entry $top.sha1 -width 40
|
||||||
|
+ ${NS}::entry $top.sha1 -width $hashlength
|
||||||
|
$top.sha1 insert 0 $rowmenuid
|
||||||
|
$top.sha1 conf -state readonly
|
||||||
|
grid $top.id $top.sha1 -sticky w
|
||||||
|
@@ -9652,10 +9669,11 @@ proc mktaggo {} {
|
||||||
|
|
||||||
|
proc copyreference {} {
|
||||||
|
global rowmenuid autosellen
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set format "%h (\"%s\", %ad)"
|
||||||
|
set cmd [list git show -s --pretty=format:$format --date=short]
|
||||||
|
- if {$autosellen < 40} {
|
||||||
|
+ if {$autosellen < $hashlength} {
|
||||||
|
lappend cmd --abbrev=$autosellen
|
||||||
|
}
|
||||||
|
set reference [safe_exec [concat $cmd $rowmenuid]]
|
||||||
|
@@ -9666,6 +9684,7 @@ proc copyreference {} {
|
||||||
|
|
||||||
|
proc writecommit {} {
|
||||||
|
global rowmenuid wrcomtop commitinfo wrcomcmd NS
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set top .writecommit
|
||||||
|
set wrcomtop $top
|
||||||
|
@@ -9675,7 +9694,7 @@ proc writecommit {} {
|
||||||
|
${NS}::label $top.title -text [mc "Write commit to file"]
|
||||||
|
grid $top.title - -pady 10
|
||||||
|
${NS}::label $top.id -text [mc "ID:"]
|
||||||
|
- ${NS}::entry $top.sha1 -width 40
|
||||||
|
+ ${NS}::entry $top.sha1 -width $hashlength
|
||||||
|
$top.sha1 insert 0 $rowmenuid
|
||||||
|
$top.sha1 conf -state readonly
|
||||||
|
grid $top.id $top.sha1 -sticky w
|
||||||
|
@@ -9755,6 +9774,7 @@ proc mvbranch {} {
|
||||||
|
|
||||||
|
proc branchdia {top valvar uivar} {
|
||||||
|
global NS commitinfo
|
||||||
|
+ global hashlength
|
||||||
|
upvar $valvar val $uivar ui
|
||||||
|
|
||||||
|
catch {destroy $top}
|
||||||
|
@@ -9763,7 +9783,7 @@ proc branchdia {top valvar uivar} {
|
||||||
|
${NS}::label $top.title -text $ui(title)
|
||||||
|
grid $top.title - -pady 10
|
||||||
|
${NS}::label $top.id -text [mc "ID:"]
|
||||||
|
- ${NS}::entry $top.sha1 -width 40
|
||||||
|
+ ${NS}::entry $top.sha1 -width $hashlength
|
||||||
|
$top.sha1 insert 0 $val(id)
|
||||||
|
$top.sha1 conf -state readonly
|
||||||
|
grid $top.id $top.sha1 -sticky w
|
||||||
|
@@ -9773,7 +9793,7 @@ proc branchdia {top valvar uivar} {
|
||||||
|
grid x $top.head -sticky ew
|
||||||
|
grid columnconfigure $top 1 -weight 1
|
||||||
|
${NS}::label $top.nlab -text [mc "Name:"]
|
||||||
|
- ${NS}::entry $top.name -width 40
|
||||||
|
+ ${NS}::entry $top.name -width $hashlength
|
||||||
|
$top.name insert 0 $val(name)
|
||||||
|
grid $top.nlab $top.name -sticky w
|
||||||
|
${NS}::frame $top.buts
|
||||||
|
@@ -11762,6 +11782,7 @@ proc prefspage_general {notebook} {
|
||||||
|
global tabstop wrapcomment wrapdefault limitdiffs
|
||||||
|
global autocopy autoselect autosellen extdifftool perfile_attrs
|
||||||
|
global hideremotes want_ttk have_ttk maxrefs web_browser
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
set page [create_prefs_page $notebook.general]
|
||||||
|
|
||||||
|
@@ -11790,7 +11811,8 @@ proc prefspage_general {notebook} {
|
||||||
|
-variable autoselect
|
||||||
|
grid x $page.autoselect -sticky w
|
||||||
|
}
|
||||||
|
- spinbox $page.autosellen -from 1 -to 40 -width 4 -textvariable autosellen
|
||||||
|
+
|
||||||
|
+ spinbox $page.autosellen -from 1 -to $hashlength -width 4 -textvariable autosellen
|
||||||
|
${NS}::label $page.autosellenl -text [mc "Length of commit ID to copy"]
|
||||||
|
grid x $page.autosellenl $page.autosellen -sticky w
|
||||||
|
|
||||||
|
@@ -12556,6 +12578,17 @@ if {$tclencoding == {}} {
|
||||||
|
puts stderr "Warning: encoding $gitencoding is not supported by Tcl/Tk"
|
||||||
|
}
|
||||||
|
|
||||||
|
+# Use object format as hash algorightm (either "sha1" or "sha256")
|
||||||
|
+set hashalgorithm [exec git rev-parse --show-object-format]
|
||||||
|
+if {$hashalgorithm eq "sha1"} {
|
||||||
|
+ set hashlength 40
|
||||||
|
+} elseif {$hashalgorithm eq "sha256"} {
|
||||||
|
+ set hashlength 64
|
||||||
|
+} else {
|
||||||
|
+ puts stderr "Unknown hash algorithm: $hashalgorithm"
|
||||||
|
+ exit 1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
set gui_encoding [encoding system]
|
||||||
|
catch {
|
||||||
|
set enc [exec git config --get gui.encoding]
|
||||||
|
@@ -12610,7 +12643,7 @@ set limitdiffs 1
|
||||||
|
set datetimeformat "%Y-%m-%d %H:%M:%S"
|
||||||
|
set autocopy 0
|
||||||
|
set autoselect 1
|
||||||
|
-set autosellen 40
|
||||||
|
+set autosellen $hashlength
|
||||||
|
set perfile_attrs 0
|
||||||
|
set want_ttk 1
|
||||||
|
|
197
0002-git-gui-Add-support-of-SHA256-repo.patch
Normal file
197
0002-git-gui-Add-support-of-SHA256-repo.patch
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
From 36516ccae8af702640d900067998f4c7310d5b05 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Date: Fri, 13 Jun 2025 17:36:34 +0200
|
||||||
|
Subject: [PATCH] git-gui: Add support of SHA256 repo
|
||||||
|
|
||||||
|
This patch adds the basic support of SHA256 Git repositories.
|
||||||
|
The needed changes were mostly about adjusting the fixed ID length of
|
||||||
|
SHA1 (40) to be variable depending on the repo type.
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
git-gui/git-gui.sh | 13 ++++++++++++-
|
||||||
|
git-gui/lib/blame.tcl | 12 ++++++++----
|
||||||
|
git-gui/lib/choose_repository.tcl | 8 ++++++--
|
||||||
|
git-gui/lib/commit.tcl | 3 ++-
|
||||||
|
git-gui/lib/remote_branch_delete.tcl | 4 +++-
|
||||||
|
5 files changed, 31 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
Index: git/git-gui/git-gui.sh
|
||||||
|
===================================================================
|
||||||
|
--- git.orig/git-gui/git-gui.sh
|
||||||
|
+++ git/git-gui/git-gui.sh
|
||||||
|
@@ -1298,6 +1298,17 @@ if {[catch {
|
||||||
|
set picked 1
|
||||||
|
}
|
||||||
|
|
||||||
|
+# Use object format as hash algorightm (either "sha1" or "sha256")
|
||||||
|
+set hashalgorithm [exec git rev-parse --show-object-format]
|
||||||
|
+if {$hashalgorithm eq "sha1"} {
|
||||||
|
+ set hashlength 40
|
||||||
|
+} elseif {$hashalgorithm eq "sha256"} {
|
||||||
|
+ set hashlength 64
|
||||||
|
+} else {
|
||||||
|
+ puts stderr "Unknown hash algorithm: $hashalgorithm"
|
||||||
|
+ exit 1
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# we expand the _gitdir when it's just a single dot (i.e. when we're being
|
||||||
|
# run from the .git dir itself) lest the routines to find the worktree
|
||||||
|
# get confused
|
||||||
|
@@ -1845,7 +1856,7 @@ proc short_path {path} {
|
||||||
|
}
|
||||||
|
|
||||||
|
set next_icon_id 0
|
||||||
|
-set null_sha1 [string repeat 0 40]
|
||||||
|
+set null_sha1 [string repeat 0 $hashlength]
|
||||||
|
|
||||||
|
proc merge_state {path new_state {head_info {}} {index_info {}}} {
|
||||||
|
global file_states next_icon_id null_sha1
|
||||||
|
Index: git/git-gui/lib/blame.tcl
|
||||||
|
===================================================================
|
||||||
|
--- git.orig/git-gui/lib/blame.tcl
|
||||||
|
+++ git/git-gui/lib/blame.tcl
|
||||||
|
@@ -426,6 +426,7 @@ method _kill {} {
|
||||||
|
|
||||||
|
method _load {jump} {
|
||||||
|
variable group_colors
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
_hide_tooltip $this
|
||||||
|
|
||||||
|
@@ -436,7 +437,7 @@ method _load {jump} {
|
||||||
|
$i conf -state normal
|
||||||
|
$i delete 0.0 end
|
||||||
|
foreach g [$i tag names] {
|
||||||
|
- if {[regexp {^g[0-9a-f]{40}$} $g]} {
|
||||||
|
+ if {[regexp [string map "@@ $hashlength" {^g[0-9a-f]{@@}$}] $g]} {
|
||||||
|
$i tag delete $g
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -500,6 +501,8 @@ method _load {jump} {
|
||||||
|
}
|
||||||
|
|
||||||
|
method _history_menu {} {
|
||||||
|
+ global hashlength
|
||||||
|
+
|
||||||
|
set m $w.backmenu
|
||||||
|
if {[winfo exists $m]} {
|
||||||
|
$m delete 0 end
|
||||||
|
@@ -513,7 +516,7 @@ method _history_menu {} {
|
||||||
|
set c [lindex $e 0]
|
||||||
|
set f [lindex $e 1]
|
||||||
|
|
||||||
|
- if {[regexp {^[0-9a-f]{40}$} $c]} {
|
||||||
|
+ if {[regexp [string map "@@ $hashlength" {^[0-9a-f]{@@}$}] $c]} {
|
||||||
|
set t [string range $c 0 8]...
|
||||||
|
} elseif {$c eq {}} {
|
||||||
|
set t {Working Directory}
|
||||||
|
@@ -627,6 +630,7 @@ method _exec_blame {cur_w cur_d options
|
||||||
|
method _read_blame {fd cur_w cur_d} {
|
||||||
|
upvar #0 $cur_d line_data
|
||||||
|
variable group_colors
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
if {$fd ne $current_fd} {
|
||||||
|
catch {close $fd}
|
||||||
|
@@ -635,7 +639,7 @@ method _read_blame {fd cur_w cur_d} {
|
||||||
|
|
||||||
|
$cur_w conf -state normal
|
||||||
|
while {[gets $fd line] >= 0} {
|
||||||
|
- if {[regexp {^([a-z0-9]{40}) (\d+) (\d+) (\d+)$} $line line \
|
||||||
|
+ if {[regexp [string map "@@ $hashlength" {^([a-z0-9]{@@}) (\d+) (\d+) (\d+)$}] $line line \
|
||||||
|
cmit original_line final_line line_count]} {
|
||||||
|
set r_commit $cmit
|
||||||
|
set r_orig_line $original_line
|
||||||
|
@@ -648,7 +652,7 @@ method _read_blame {fd cur_w cur_d} {
|
||||||
|
set oln $r_orig_line
|
||||||
|
set cmit $r_commit
|
||||||
|
|
||||||
|
- if {[regexp {^0{40}$} $cmit]} {
|
||||||
|
+ if {[regexp [string map "@@ $hashlength" {^0{@@}$}] $cmit]} {
|
||||||
|
set commit_abbr work
|
||||||
|
set commit_type curr_commit
|
||||||
|
} elseif {$cmit eq $commit} {
|
||||||
|
Index: git/git-gui/lib/choose_repository.tcl
|
||||||
|
===================================================================
|
||||||
|
--- git.orig/git-gui/lib/choose_repository.tcl
|
||||||
|
+++ git/git-gui/lib/choose_repository.tcl
|
||||||
|
@@ -870,6 +870,8 @@ method _do_clone_HEAD {ok} {
|
||||||
|
}
|
||||||
|
|
||||||
|
method _do_clone_full_end {ok} {
|
||||||
|
+ global hashlength
|
||||||
|
+
|
||||||
|
$o_cons done $ok
|
||||||
|
|
||||||
|
if {$ok} {
|
||||||
|
@@ -879,7 +881,7 @@ method _do_clone_full_end {ok} {
|
||||||
|
if {[file exists [gitdir FETCH_HEAD]]} {
|
||||||
|
set fd [safe_open_file [gitdir FETCH_HEAD] r]
|
||||||
|
while {[gets $fd line] >= 0} {
|
||||||
|
- if {[regexp "^(.{40})\t\t" $line line HEAD]} {
|
||||||
|
+ if {[regexp [string map "@@ $hashlength" "^(.{@@})\t\t"] $line line HEAD]} {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -966,6 +968,8 @@ method _do_clone_checkout {HEAD} {
|
||||||
|
}
|
||||||
|
|
||||||
|
method _readtree_wait {fd} {
|
||||||
|
+ global hashlength
|
||||||
|
+
|
||||||
|
set buf [read $fd]
|
||||||
|
$o_status_op update_meter $buf
|
||||||
|
append readtree_err $buf
|
||||||
|
@@ -987,7 +991,7 @@ method _readtree_wait {fd} {
|
||||||
|
|
||||||
|
# -- Run the post-checkout hook.
|
||||||
|
#
|
||||||
|
- set fd_ph [githook_read post-checkout [string repeat 0 40] \
|
||||||
|
+ set fd_ph [githook_read post-checkout [string repeat 0 $hashlength] \
|
||||||
|
[git rev-parse HEAD] 1]
|
||||||
|
if {$fd_ph ne {}} {
|
||||||
|
global pch_error
|
||||||
|
Index: git/git-gui/lib/commit.tcl
|
||||||
|
===================================================================
|
||||||
|
--- git.orig/git-gui/lib/commit.tcl
|
||||||
|
+++ git/git-gui/lib/commit.tcl
|
||||||
|
@@ -348,6 +348,7 @@ proc commit_committree {fd_wt curHEAD ms
|
||||||
|
global file_states selected_paths rescan_active
|
||||||
|
global repo_config
|
||||||
|
global env
|
||||||
|
+ global hashlength
|
||||||
|
|
||||||
|
gets $fd_wt tree_id
|
||||||
|
if {[catch {close $fd_wt} err]} {
|
||||||
|
@@ -367,7 +368,7 @@ proc commit_committree {fd_wt curHEAD ms
|
||||||
|
close $fd_ot
|
||||||
|
|
||||||
|
if {[string equal -length 5 {tree } $old_tree]
|
||||||
|
- && [string length $old_tree] == 45} {
|
||||||
|
+ && [string length $old_tree] == [expr {$hashlength + 5}]} {
|
||||||
|
set old_tree [string range $old_tree 5 end]
|
||||||
|
} else {
|
||||||
|
error [mc "Commit %s appears to be corrupt" $PARENT]
|
||||||
|
Index: git/git-gui/lib/remote_branch_delete.tcl
|
||||||
|
===================================================================
|
||||||
|
--- git.orig/git-gui/lib/remote_branch_delete.tcl
|
||||||
|
+++ git/git-gui/lib/remote_branch_delete.tcl
|
||||||
|
@@ -323,6 +323,8 @@ method _load {cache uri} {
|
||||||
|
}
|
||||||
|
|
||||||
|
method _read {cache fd} {
|
||||||
|
+ global hashlength
|
||||||
|
+
|
||||||
|
if {$fd ne $active_ls} {
|
||||||
|
catch {close $fd}
|
||||||
|
return
|
||||||
|
@@ -330,7 +332,7 @@ method _read {cache fd} {
|
||||||
|
|
||||||
|
while {[gets $fd line] >= 0} {
|
||||||
|
if {[string match {*^{}} $line]} continue
|
||||||
|
- if {[regexp {^([0-9a-f]{40}) (.*)$} $line _junk obj ref]} {
|
||||||
|
+ if {[regexp [string map "@@ $hashlength" {^([0-9a-f]{@@}) (.*)$}] $line _junk obj ref]} {
|
||||||
|
if {[regsub ^refs/heads/ $ref {} abr]} {
|
||||||
|
lappend head_list $abr
|
||||||
|
lappend head_cache($cache) $abr
|
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:51bfe87eb1c02fed1484051875365eeab229831d30d0cec5d89a14f9e40e9adb
|
|
||||||
size 7487680
|
|
Binary file not shown.
BIN
git-2.46.0.tar.xz
(Stored with Git LFS)
BIN
git-2.46.0.tar.xz
(Stored with Git LFS)
Binary file not shown.
BIN
git-2.50.1.tar.sign
Normal file
BIN
git-2.50.1.tar.sign
Normal file
Binary file not shown.
3
git-2.50.1.tar.xz
Normal file
3
git-2.50.1.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:7e3e6c36decbd8f1eedd14d42db6674be03671c2204864befa2a41756c5c8fc4
|
||||||
|
size 7880972
|
@@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
Documentation/asciidoc.conf | 2 ++
|
Documentation/asciidoc.conf.in | 2 ++
|
||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
Index: git-2.11.0/Documentation/asciidoc.conf
|
Index: git-2.48.0/Documentation/asciidoc.conf.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- git-2.11.0.orig/Documentation/asciidoc.conf
|
--- git-2.48.0.orig/Documentation/asciidoc.conf.in
|
||||||
+++ git-2.11.0/Documentation/asciidoc.conf
|
+++ git-2.48.0/Documentation/asciidoc.conf.in
|
||||||
@@ -21,6 +21,8 @@ tilde=~
|
@@ -24,6 +24,8 @@ litdd=--
|
||||||
apostrophe='
|
manmanual=Git Manual
|
||||||
backtick=`
|
mansource=Git @GIT_VERSION@
|
||||||
litdd=--
|
revdate=@GIT_DATE@
|
||||||
+# drops the "last-updated" footer, with asciidoc-8.6.9+
|
+# drops the "last-updated" footer, with asciidoc-8.6.9+
|
||||||
+footer-style=none
|
+footer-style=none
|
||||||
|
|
||||||
ifdef::backend-docbook[]
|
ifdef::doctype-book[]
|
||||||
[linkgit-inlinemacro]
|
[titles]
|
||||||
|
265
git.changes
265
git.changes
@@ -1,3 +1,268 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 9 11:01:47 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- refreshed gitk sha256 patches:
|
||||||
|
0001-gitk-Add-support-of-SHA256-repo.patch
|
||||||
|
0002-git-gui-Add-support-of-SHA256-repo.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 9 10:48:56 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- update to 2.50.1 (boo#1245938 boo#1245939 boo#1245942 boo#1245943
|
||||||
|
boo#1245946 boo#1245947)
|
||||||
|
Security fixes for CVE-2025-27613, CVE-2025-27614,
|
||||||
|
CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385,
|
||||||
|
and CVE-2025-48386
|
||||||
|
|
||||||
|
CVE-2025-27613, Gitk:
|
||||||
|
|
||||||
|
When a user clones an untrusted repository and runs Gitk without
|
||||||
|
additional command arguments, any writable file can be created and
|
||||||
|
truncated. The option "Support per-file encoding" must have been
|
||||||
|
enabled. The operation "Show origin of this line" is affected as
|
||||||
|
well, regardless of the option being enabled or not.
|
||||||
|
|
||||||
|
CVE-2025-27614, Gitk:
|
||||||
|
|
||||||
|
A Git repository can be crafted in such a way that a user who has
|
||||||
|
cloned the repository can be tricked into running any script
|
||||||
|
supplied by the attacker by invoking `gitk filename`, where
|
||||||
|
`filename` has a particular structure.
|
||||||
|
|
||||||
|
CVE-2025-46334, Git GUI (Windows only):
|
||||||
|
|
||||||
|
A malicious repository can ship versions of sh.exe or typical
|
||||||
|
textconv filter programs such as astextplain. On Windows, path
|
||||||
|
lookup can find such executables in the worktree. These programs
|
||||||
|
are invoked when the user selects "Git Bash" or "Browse Files" from
|
||||||
|
the menu.
|
||||||
|
|
||||||
|
CVE-2025-46835, Git GUI:
|
||||||
|
|
||||||
|
When a user clones an untrusted repository and is tricked into
|
||||||
|
editing a file located in a maliciously named directory in the
|
||||||
|
repository, then Git GUI can create and overwrite any writable
|
||||||
|
file.
|
||||||
|
|
||||||
|
CVE-2025-48384, Git:
|
||||||
|
|
||||||
|
When reading a config value, Git strips any trailing carriage
|
||||||
|
return and line feed (CRLF). When writing a config entry, values
|
||||||
|
with a trailing CR are not quoted, causing the CR to be lost when
|
||||||
|
the config is later read. When initializing a submodule, if the
|
||||||
|
submodule path contains a trailing CR, the altered path is read
|
||||||
|
resulting in the submodule being checked out to an incorrect
|
||||||
|
location. If a symlink exists that points the altered path to the
|
||||||
|
submodule hooks directory, and the submodule contains an executable
|
||||||
|
post-checkout hook, the script may be unintentionally executed
|
||||||
|
after checkout.
|
||||||
|
|
||||||
|
CVE-2025-48385, Git:
|
||||||
|
|
||||||
|
When cloning a repository Git knows to optionally fetch a bundle
|
||||||
|
advertised by the remote server, which allows the server-side to
|
||||||
|
offload parts of the clone to a CDN. The Git client does not
|
||||||
|
perform sufficient validation of the advertised bundles, which
|
||||||
|
allows the remote side to perform protocol injection.
|
||||||
|
This protocol injection can cause the client to write the fetched
|
||||||
|
bundle to a location controlled by the adversary. The fetched
|
||||||
|
content is fully controlled by the server, which can in the worst
|
||||||
|
case lead to arbitrary code execution.
|
||||||
|
CVE-2025-48386, Git:
|
||||||
|
|
||||||
|
The wincred credential helper uses a static buffer (`target`) as a
|
||||||
|
unique key for storing and comparing against internal storage. This
|
||||||
|
credential helper does not properly bounds check the available
|
||||||
|
space remaining in the buffer before appending to it with
|
||||||
|
`wcsncat()`, leading to potential buffer overflows.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 26 15:32:00 UTC 2025 - Takashi Iwai <tiwai@suse.com>
|
||||||
|
|
||||||
|
- Fix git-gui citool SHA256 repo handling:
|
||||||
|
refreshed 0002-git-gui-Add-support-of-SHA256-repo.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 17 17:55:40 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- update to 2.50.0
|
||||||
|
https://about.gitlab.com/blog/what-s-new-in-git-2-50-0/
|
||||||
|
https://raw.githubusercontent.com/git/git/refs/tags/v2.50.0/Documentation/RelNotes/2.50.0.adoc
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 13 15:50:22 UTC 2025 - Takashi Iwai <tiwai@suse.com>
|
||||||
|
|
||||||
|
- Refresh gitk SHA256 patch and add SHA256 support to git-gui (bsc#1239989):
|
||||||
|
0001-gitk-Add-support-of-SHA256-repo.patch
|
||||||
|
0002-git-gui-Add-support-of-SHA256-repo.patch
|
||||||
|
The previous patches are dropped:
|
||||||
|
0001-gitk-Add-a-basic-support-of-SHA256-repositories-into.patch
|
||||||
|
0002-gitk-Add-auto-select-length-preference-for-SHA256.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 24 14:04:56 UTC 2025 - Takashi Iwai <tiwai@suse.com>
|
||||||
|
|
||||||
|
- Add support of SHA256 git repo for gitk (bsc#1239989):
|
||||||
|
0001-gitk-Add-a-basic-support-of-SHA256-repositories-into.patch
|
||||||
|
0002-gitk-Add-auto-select-length-preference-for-SHA256.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 14 23:43:43 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
|
||||||
|
|
||||||
|
- update to 2.49.0
|
||||||
|
https://about.gitlab.com/blog/2025/03/14/whats-new-in-git-2-49-0/
|
||||||
|
https://raw.githubusercontent.com/git/git/refs/tags/v2.49.0/Documentation/RelNotes/2.49.0.adoc
|
||||||
|
- switch to zlib-ng for code 16
|
||||||
|
- docs switched to asciidoc
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 14 21:45:04 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||||
|
|
||||||
|
- update to 2.48.1: (boo#1235600 boo#1235601)
|
||||||
|
* CVE-2024-50349, CVE-2024-52006:
|
||||||
|
refuse to accept URLs that contain control sequences
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 13 20:00:00 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||||
|
|
||||||
|
- update to 2.48.0
|
||||||
|
* Reference consistency checks: git refs verify
|
||||||
|
* Reflogs can now be migrated with git refs migrate
|
||||||
|
* git is free of memory leaks as covered by the test suite
|
||||||
|
* Performance improvements
|
||||||
|
* Other improvements, UI changes, options extensions and largely
|
||||||
|
compatible behavior changes as listed in
|
||||||
|
https://raw.githubusercontent.com/git/git/refs/tags/v2.48.0/Documentation/RelNotes/2.48.0.txt
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 25 10:58:31 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||||
|
|
||||||
|
- update to 2.47.1:
|
||||||
|
* Use after free and double freeing at the end in
|
||||||
|
"git log -L... -p" had been identified and fixed.
|
||||||
|
* "git maintenance start" crashed due to an uninitialized
|
||||||
|
variable reference, which has been corrected.
|
||||||
|
* Fail gracefully instead of crashing when attempting to write
|
||||||
|
the contents of a corrupt in-core index as a tree object.
|
||||||
|
* A "git fetch" from the superproject going down to a submodule
|
||||||
|
used a wrong remote when the default remote names are set
|
||||||
|
differently between them.
|
||||||
|
* The "gitk" project tree has been synchronized again
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 9 10:34:12 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 2.47.0:
|
||||||
|
* https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.47.0.txt
|
||||||
|
* Many Porcelain commands that internally use the merge machinery
|
||||||
|
were taught to consistently honor the diff.algorithm
|
||||||
|
configuration.
|
||||||
|
* A few descriptions in "git show-ref -h" have been clarified.
|
||||||
|
* A 'P' command to "git add -p" that passes the patch hunk to the
|
||||||
|
pager has been added.
|
||||||
|
* "git grep -W" omits blank lines that follow the found function at
|
||||||
|
the end of the file, just like it omits blank lines before the next
|
||||||
|
function.
|
||||||
|
* The value of http.proxy can have "path" at the end for a socks
|
||||||
|
proxy that listens to a unix-domain socket, but we started to
|
||||||
|
discard it when we taught proxy auth code path to use the
|
||||||
|
credential helpers, which has been corrected.
|
||||||
|
* The code paths to compact multiple reftable files have been updated
|
||||||
|
to correctly deal with multiple compaction triggering at the same
|
||||||
|
time.
|
||||||
|
* Support to specify ref backend for submodules has been enhanced.
|
||||||
|
* "git svn" has been taught about svn:global-ignores property
|
||||||
|
recent versions of Subversion has.
|
||||||
|
* The default object hash and ref backend format used to be settable
|
||||||
|
only with explicit command line option to "git init" and
|
||||||
|
environment variables, but now they can be configured in the user's
|
||||||
|
global and system wide configuration.
|
||||||
|
* "git send-email" learned "--translate-aliases" option that reads
|
||||||
|
addresses from the standard input and emits the result of applying
|
||||||
|
aliases on them to the standard output.
|
||||||
|
* 'git for-each-ref' learned a new "--format" atom to find the branch
|
||||||
|
that the history leading to a given commit "%(is-base:<commit>)" is
|
||||||
|
likely based on.
|
||||||
|
* The command line prompt support used to be littered with bash-isms,
|
||||||
|
which has been corrected to work with more shells.
|
||||||
|
* Support for the RUNTIME_PREFIX feature has been added to z/OS port.
|
||||||
|
* "git send-email" learned "--mailmap" option to allow rewriting the
|
||||||
|
recipient addresses.
|
||||||
|
* "git mergetool" learned to use VSCode as a merge backend.
|
||||||
|
* "git pack-redundant" has been marked for removal in Git 3.0.
|
||||||
|
* One-line messages to "die" and other helper functions will get LF
|
||||||
|
added by these helper functions, but many existing messages had an
|
||||||
|
unnecessary LF at the end, which have been corrected.
|
||||||
|
* The "scalar clone" command learned the "--no-tags" option.
|
||||||
|
* The environment GIT_ADVICE has been intentionally kept undocumented
|
||||||
|
to discourage its use by interactive users. Add documentation to
|
||||||
|
help tool writers.
|
||||||
|
* "git apply --3way" learned to take "--ours" and other options.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 7 12:01:19 UTC 2024 - Antonio Teixeira <antonio.teixeira@suse.com>
|
||||||
|
|
||||||
|
- Update to version 2.46.2:
|
||||||
|
* Revert the "git patch-id" change that went into 2.46.1,
|
||||||
|
as it seems to have got a regression reported (I haven't verified,
|
||||||
|
but it is better to keep a known breakage than adding an unintended
|
||||||
|
regression).
|
||||||
|
* In a few corner cases "git diff --exit-code" failed to report
|
||||||
|
"changes" (e.g., renamed without any content change), which has
|
||||||
|
been corrected.
|
||||||
|
* The interpret-trailers command failed to recognise the end of the
|
||||||
|
message when the commit log ends in an incomplete line.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 20 08:18:30 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
- Update to version 2.46.1;
|
||||||
|
* "git checkout --ours" (no other arguments) complained that the
|
||||||
|
option is incompatible with branch switching, which is technically
|
||||||
|
correct, but found confusing by some users. It now says that the
|
||||||
|
user needs to give pathspec to specify what paths to checkout.
|
||||||
|
* It has been documented that we avoid "VAR=VAL shell_func" and why.
|
||||||
|
* "git add -p" by users with diff.suppressBlankEmpty set to true
|
||||||
|
failed to parse the patch that represents an unmodified empty line
|
||||||
|
with an empty line (not a line with a single space on it), which
|
||||||
|
has been corrected.
|
||||||
|
* "git rebase --help" referred to "offset" (the difference between
|
||||||
|
the location a change was taken from and the change gets replaced)
|
||||||
|
incorrectly and called it "fuzz", which has been corrected.
|
||||||
|
* "git notes add -m '' --allow-empty" and friends that take prepared
|
||||||
|
data to create notes should not invoke an editor, but it started
|
||||||
|
doing so since Git 2.42, which has been corrected.
|
||||||
|
* An expensive operation to prepare tracing was done in re-encoding
|
||||||
|
code path even when the tracing was not requested, which has been
|
||||||
|
corrected.
|
||||||
|
* Perforce tests have been updated.
|
||||||
|
* The credential helper to talk to OSX keychain sometimes sent
|
||||||
|
garbage bytes after the username, which has been corrected.
|
||||||
|
* A recent update broke "git ls-remote" used outside a repository,
|
||||||
|
which has been corrected.
|
||||||
|
* "git config --value=foo --fixed-value section.key newvalue" barfed
|
||||||
|
when the existing value in the configuration file used the
|
||||||
|
valueless true syntax, which has been corrected.
|
||||||
|
* "git reflog expire" failed to honor annotated tags when computing
|
||||||
|
reachable commits.
|
||||||
|
* A flakey test and incorrect calls to strtoX() functions have been
|
||||||
|
fixed.
|
||||||
|
* Follow-up on 2.45.1 regression fix.
|
||||||
|
* "git rev-list ... | git diff-tree -p --remerge-diff --stdin" should
|
||||||
|
behave more or less like "git log -p --remerge-diff" but instead it
|
||||||
|
crashed, forgetting to prepare a temporary object store needed.
|
||||||
|
* The patch parser in "git patch-id" has been tightened to avoid
|
||||||
|
getting confused by lines that look like a patch header in the log
|
||||||
|
message.
|
||||||
|
* "git bundle unbundle" outside a repository triggered a BUG()
|
||||||
|
unnecessarily, which has been corrected.
|
||||||
|
* The code forgot to discard unnecessary in-core commit buffer data
|
||||||
|
for commits that "git log --skip=<number>" traversed but omitted
|
||||||
|
from the output, which has been corrected.
|
||||||
|
* "git verify-pack" and "git index-pack" started dying outside a
|
||||||
|
repository, which has been corrected.
|
||||||
|
* A corner case bug in "git stash" was fixed.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Aug 28 08:33:45 UTC 2024 - Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
|
Wed Aug 28 08:33:45 UTC 2024 - Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
|
||||||
|
|
||||||
|
19
git.spec
19
git.spec
@@ -1,8 +1,8 @@
|
|||||||
#
|
#
|
||||||
# spec file for package git
|
# spec file for package git
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
|
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
%bcond_with asciidoctor
|
%bcond_with asciidoctor
|
||||||
%endif
|
%endif
|
||||||
Name: git
|
Name: git
|
||||||
Version: 2.46.0
|
Version: 2.50.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Fast, scalable, distributed revision control system
|
Summary: Fast, scalable, distributed revision control system
|
||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
@@ -70,6 +70,9 @@ Patch8: git-asciidoc.patch
|
|||||||
Patch10: setup-don-t-fail-if-commondir-reference-is-deleted.patch
|
Patch10: setup-don-t-fail-if-commondir-reference-is-deleted.patch
|
||||||
# PATCH-FIX-OPENSUSE CVE-2024-24577.patch boo#1219660 antonio.teixeira@suse.com
|
# PATCH-FIX-OPENSUSE CVE-2024-24577.patch boo#1219660 antonio.teixeira@suse.com
|
||||||
Patch11: CVE-2024-24577.patch
|
Patch11: CVE-2024-24577.patch
|
||||||
|
# Add SHA256 support for gitk and git-gui (bsc#1239989)
|
||||||
|
Patch20: 0001-gitk-Add-support-of-SHA256-repo.patch
|
||||||
|
Patch21: 0002-git-gui-Add-support-of-SHA256-repo.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gpg2
|
BuildRequires: gpg2
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
@@ -86,7 +89,11 @@ BuildRequires: systemd-rpm-macros
|
|||||||
BuildRequires: tcsh
|
BuildRequires: tcsh
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
|
%if 0%{?suse_version} >= 1600
|
||||||
|
BuildRequires: pkgconfig(zlib-ng)
|
||||||
|
%else
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
%endif
|
||||||
Requires: git-core = %{version}
|
Requires: git-core = %{version}
|
||||||
Requires: perl-Git = %{version}
|
Requires: perl-Git = %{version}
|
||||||
Recommends: git-email
|
Recommends: git-email
|
||||||
@@ -434,9 +441,9 @@ if ! test -f %{buildroot}%{gitexecdir}/git-add; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "%{buildroot}/%{_docdir}/git" "%{buildroot}/%{_docdir}/git/howto" "%{buildroot}/%{_docdir}/git/technical"
|
mkdir -p "%{buildroot}/%{_docdir}/git" "%{buildroot}/%{_docdir}/git/howto" "%{buildroot}/%{_docdir}/git/technical"
|
||||||
cp -a README.md Documentation/*.txt "%{buildroot}/%{_docdir}/git/"
|
cp -a README.md Documentation/*.adoc "%{buildroot}/%{_docdir}/git/"
|
||||||
cp -a Documentation/howto/*.txt "%{buildroot}/%{_docdir}/git/howto/"
|
cp -a Documentation/howto/*.adoc "%{buildroot}/%{_docdir}/git/howto/"
|
||||||
cp -a Documentation/technical/*.txt "%{buildroot}/%{_docdir}/git/technical/"
|
cp -a Documentation/technical/*.adoc "%{buildroot}/%{_docdir}/git/technical/"
|
||||||
%{!?_without_docs: cp -a Documentation/*.html "%{buildroot}/%{_docdir}/git/"}
|
%{!?_without_docs: cp -a Documentation/*.html "%{buildroot}/%{_docdir}/git/"}
|
||||||
%{!?_without_docs: cp -a Documentation/howto/*.html "%{buildroot}/%{_docdir}/git/howto/"}
|
%{!?_without_docs: cp -a Documentation/howto/*.html "%{buildroot}/%{_docdir}/git/howto/"}
|
||||||
%{!?_without_docs: cp -a Documentation/technical/*.html "%{buildroot}/%{_docdir}/git/technical/"}
|
%{!?_without_docs: cp -a Documentation/technical/*.html "%{buildroot}/%{_docdir}/git/technical/"}
|
||||||
|
Reference in New Issue
Block a user