12 Commits

Author SHA256 Message Date
4b755804f2 Accepting request 1318455 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1318455
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=331
2025-11-20 13:46:09 +00:00
1d5182d579 - Update to 2.52.0:
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git?expand=0&rev=689
2025-11-18 13:43:09 +00:00
9a47e4f331 Accepting request 1314907 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1314907
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=330
2025-11-01 22:34:20 +00:00
2cf5d44358 - Add patch from upstream to fix a test that fails with
openssh 10.1:
  * 0001-t7528-work-around-ETOOMANY-in-OpenSSH-10.1-and-newer.patch

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git?expand=0&rev=687
2025-10-31 14:16:38 +00:00
05adae6b7a Accepting request 1311738 from devel:tools:scm
Forwarded request #1311737 from ateixeira

- Update to 2.51.1:
  - Fixes since Git 2.51.0
    * The "do you still use it?" message given by a command that is
      deeply deprecated and allow us to suggest alternatives has been
      updated.
    * The compatObjectFormat extension is used to hide an incomplete
      feature that is not yet usable for any purpose other than
      developing the feature further.  Document it as such to discourage
      its use by mere mortals.
    * Manual page for "gitk" is updated with the current maintainer's
      name.
    * Update the instructions for using GGG in the MyFirstContribution
      document to say that a GitHub PR could be made against `git/git`
      instead of `gitgitgadget/git`.
    * Clang-format update to let our control macros be formatted the way we
      had them traditionally, e.g., "for_each_string_list_item()" without
      space before the parentheses.
    * A few places where a size_t value was cast to curl_off_t without
      checking has been updated to use the existing helper function.
    * The start_delayed_progress() function in the progress eye-candy API
      did not clear its internal state, making an initial delay value
      larger than 1 second ineffective, which has been corrected.
    * Makefile tried to run multiple "cargo build" which would not work
      very well; serialize their execution to work around this problem.
    * Adjust to the way newer versions of cURL selectively enable tracing
      options, so that our tests can continue to work.
    * During interactive rebase, using 'drop' on a merge commit led to
      an error, which has been corrected.
    * "git refs migrate" to migrate the reflog entries from a refs
      backend to another had a handful of bugs squashed.

OBS-URL: https://build.opensuse.org/request/show/1311738
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=329
2025-10-18 12:35:59 +00:00
b73384fbb3 Accepting request 1311737 from home:ateixeira:branches:devel:tools:scm
- Update to 2.51.1:
  - Fixes since Git 2.51.0
    * The "do you still use it?" message given by a command that is
      deeply deprecated and allow us to suggest alternatives has been
      updated.
    * The compatObjectFormat extension is used to hide an incomplete
      feature that is not yet usable for any purpose other than
      developing the feature further.  Document it as such to discourage
      its use by mere mortals.
    * Manual page for "gitk" is updated with the current maintainer's
      name.
    * Update the instructions for using GGG in the MyFirstContribution
      document to say that a GitHub PR could be made against `git/git`
      instead of `gitgitgadget/git`.
    * Clang-format update to let our control macros be formatted the way we
      had them traditionally, e.g., "for_each_string_list_item()" without
      space before the parentheses.
    * A few places where a size_t value was cast to curl_off_t without
      checking has been updated to use the existing helper function.
    * The start_delayed_progress() function in the progress eye-candy API
      did not clear its internal state, making an initial delay value
      larger than 1 second ineffective, which has been corrected.
    * Makefile tried to run multiple "cargo build" which would not work
      very well; serialize their execution to work around this problem.
    * Adjust to the way newer versions of cURL selectively enable tracing
      options, so that our tests can continue to work.
    * During interactive rebase, using 'drop' on a merge commit led to
      an error, which has been corrected.
    * "git refs migrate" to migrate the reflog entries from a refs
      backend to another had a handful of bugs squashed.

OBS-URL: https://build.opensuse.org/request/show/1311737
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git?expand=0&rev=685
2025-10-16 14:47:05 +00:00
a829446bb4 Accepting request 1300558 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1300558
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=328
2025-08-21 14:54:14 +00:00
fa39032ff1 - Use zlib instead of zlib-ng for SLES16
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git?expand=0&rev=683
2025-08-20 15:24:15 +00:00
1b1a88d06b Accepting request 1300351 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1300351
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=327
2025-08-20 11:25:02 +00:00
df6010bc75 - Update to 2.51.0
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git?expand=0&rev=681
2025-08-19 18:57:58 +00:00
c2c352de56 Accepting request 1294198 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1294198
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/git?expand=0&rev=326
2025-07-18 13:57:42 +00:00
622255014f - update git-gui sha256 patches after the upstream review:
0001-git-gui-Replace-null_sha1-with-nullid.patch
  0002-git-gui-Add-support-of-SHA256-repo.patch

OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/git?expand=0&rev=679
2025-07-17 16:04:59 +00:00
12 changed files with 685 additions and 631 deletions

View File

@@ -1,399 +0,0 @@
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

View File

@@ -1,197 +0,0 @@
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

View File

@@ -1,8 +1,8 @@
Index: b/read-cache.c
Index: git/read-cache.c
===================================================================
--- a/read-cache.c
+++ b/read-cache.c
@@ -1158,10 +1158,13 @@ static int has_dir_name(struct index_sta
--- git.orig/read-cache.c
+++ git/read-cache.c
@@ -1134,10 +1134,13 @@ static int has_dir_name(struct index_sta
size_t len;
for (;;) {

View File

@@ -2,11 +2,11 @@
contrib/completion/git-completion.bash | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Index: git-2.43.1/contrib/completion/git-completion.bash
Index: git/contrib/completion/git-completion.bash
===================================================================
--- git-2.43.1.orig/contrib/completion/git-completion.bash
+++ git-2.43.1/contrib/completion/git-completion.bash
@@ -67,10 +67,12 @@
--- git.orig/contrib/completion/git-completion.bash
+++ git/contrib/completion/git-completion.bash
@@ -81,10 +81,12 @@
# case insensitively, even on systems with case sensitive file systems
# (e.g., completing tag name "FOO" on "git checkout f<TAB>").

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e3e6c36decbd8f1eedd14d42db6674be03671c2204864befa2a41756c5c8fc4
size 7880972

BIN
git-2.52.0.tar.sign Normal file

Binary file not shown.

3
git-2.52.0.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3cd8fee86f69a949cb610fee8cd9264e6873d07fa58411f6060b3d62729ed7c5
size 7957064

View File

@@ -4,10 +4,10 @@
contrib/completion/git.tcsh | 4 ++++
3 files changed, 15 insertions(+), 10 deletions(-)
Index: git-2.11.0/contrib/completion/git-completion.tcsh
Index: git/contrib/completion/git-completion.tcsh
===================================================================
--- git-2.11.0.orig/contrib/completion/git-completion.tcsh
+++ git-2.11.0/contrib/completion/git-completion.tcsh
--- git.orig/contrib/completion/git-completion.tcsh
+++ git/contrib/completion/git-completion.tcsh
@@ -32,14 +32,14 @@ if ( ${__git_tcsh_completion_version[1]}
endif
unset __git_tcsh_completion_version
@@ -30,26 +30,26 @@ Index: git-2.11.0/contrib/completion/git-completion.tcsh
cat << EOF >! ${__git_tcsh_completion_script}
#!bash
@@ -121,6 +121,3 @@ EOF
@@ -122,6 +122,3 @@ EOF
# Don't need this variable anymore, so don't pollute the users environment
unset __git_tcsh_completion_original_script
-
-complete git 'p,*,`bash ${__git_tcsh_completion_script} git "${COMMAND_LINE}"`,'
-complete gitk 'p,*,`bash ${__git_tcsh_completion_script} gitk "${COMMAND_LINE}"`,'
Index: git-2.11.0/contrib/completion/git.csh
Index: git/contrib/completion/git.csh
===================================================================
--- /dev/null
+++ git-2.11.0/contrib/completion/git.csh
+++ git/contrib/completion/git.csh
@@ -0,0 +1,4 @@
+if (${?prompt}) then
+complete git 'p,*,`bash /usr/share/tcsh/git.complete git "${COMMAND_LINE}"`,'
+complete gitk 'p,*,`bash /usr/share/tcsh/git.complete gitk "${COMMAND_LINE}"`,'
+endif
Index: git-2.11.0/contrib/completion/git.tcsh
Index: git/contrib/completion/git.tcsh
===================================================================
--- /dev/null
+++ git-2.11.0/contrib/completion/git.tcsh
+++ git/contrib/completion/git.tcsh
@@ -0,0 +1,4 @@
+if (${?prompt}) then
+complete git 'p,*,`bash /usr/share/tcsh/git.complete git "${COMMAND_LINE}"`,'

View File

@@ -1,3 +1,659 @@
-------------------------------------------------------------------
Mon Nov 17 23:05:38 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- Update to 2.52.0:
- UI, Workflows & Features
- The "list" subcommand of "git refs" acts as a front-end for
"git for-each-ref".
- "git cmd --help-all" now works outside repositories.
- "git diff-tree" learned "--max-depth" option.
- A new subcommand "git repo" gives users a way to grab various
repository characteristics.
- A new command "git last-modified" has been added to show the
closest ancestor commit that touched each path.
- The "git refs exists" command that works like "git show-ref
--exists" has been added.
- "git repo info" learns the short-hand option "-z" that is the
same as "--format=nul", and learns to report the objects
format used in the repository.
- "core.commentChar=auto" that attempts to dynamically pick a
suitable comment character is non-workable, as it is too much
trouble to support for little benefit, and is marked as
deprecated.
- "git send-email" learned to drive "git imap-send" to store
already sent e-mails in an IMAP folder.
- The "promisor-remote" capability mechanism has been updated
to allow the "partialCloneFilter" settings and the "token"
value to be communicated from the server side.
- Declare that "git init" that is not otherwise configured uses
'main' as the initial branch, not 'master', starting Git 3.0.
- Keep giving hint about the default initial branch name for
users who may be surprised after Git 3.0 switch-over.
- The stash.index configuration variable can be set to make
"git stash pop/apply" pretend that it was invoked with
"--index".
- "git fast-import" learned that "--signed-commits=<how>"
option that corresponds to that of "git fast-export".
- Marking a hunk 'selected' in "git add -p" and then splitting
made all the split pieces 'selected'; this has been changed
to make them all 'undecided', which gives better end-user
experience.
- Configuration variables that take a pathname as a value (e.g.
blame.ignorerevsfile) can be marked as optional by prefixing
":(optional)" before its value.
- Show 'P'ipe command in "git add -p".
- "git sparse-checkout" subcommand learned a new "clean" action
to prune otherwise unused working-tree files that are outside
the areas of interest.
- "git fast-import" is taught to handle signed tags, just like
it recently learned to handle signed commits, in different
ways.
- A new configuration variable commitGraph.changedPaths allows
to turn "--changed-paths" on by default for "git
commit-graph".
- "Symlink symref" has been added to the list of things that
will disappear at Git 3.0 boundary.
- "git maintenance" command learns the "geometric" strategy
where it avoids doing maintenance tasks that rebuilds
everything from scratch.
- "git repo structure", a new command.
- The help text and manual page of "git bisect" command have
been made consistent with each other.
- Performance, Internal Implementation, Development Support etc.
- string_list_split*() family of functions have been extended
to simplify common use cases.
- Arrays of strbuf is often a wrong data structure to use, and
strbuf_split*() family of functions that create them often
have better alternatives. Update several code paths and
replace strbuf_split*().
- Revision traversal limited with pathspec, like "git log
dir/*", used to ignore changed-paths Bloom filter when the
pathspec contained wildcards; now they take advantage of the
filter when they can.
- Doc lint updates to encourage the newer and easier-to-use
`synopsis` format, with fixes to a handful of existing uses.
- Remove dependency on the_repository and other globals from
the commit-graph code, and other changes unrelated to
de-globaling.
- Discord has been added to the first contribution
documentation as another way to ask for help.
- Inspired by Ezekiel's recent effort to showcase Rust
interface, the hash function implementation used to hash
lines have been updated to the one used for ELF symbol lookup
by Glibc.
- Instead of scanning for the remaining items to see if there
are still commits to be explored in the queue, use khash to
remember which items are still on the queue (an unacceptable
alternative is to reserve one object flag bits).
- The bulk-checkin code used to depend on a file-scope static
singleton variable, which has been updated to pass an
instance throughout the callchain.
- The work to build on the bulk-checkin infrastructure to
create many objects at once in a transaction and to abstract
it into the generic object layer continues.
- CodingGuidelines now spells out how bitfields are to be
written.
- Adjust to the way newer versions of cURL selectively enable
tracing options, so that our tests can continue to work.
- The clear_alloc_state() API function was not fully clearing
the structure for reuse, but since nobody reuses it, replace
it with a variant that frees the structure as well, making
the callers simpler.
- "git range-diff" learned a way to limit the memory consumed
by O(N*N) cost matrix.
- Some places in the code confused a variable that is *not* a
boolean to enable color but is an enum that records what the
user requested to do about color. A couple of bugs of this
sort have been fixed, while the code has been cleaned up to
prevent similar bugs in the future.
- The build procedure based on meson learned a target to only
build documentation, similar to "make doc".
- Dip our toes a bit to (optionally) use Rust implemented
helper called from our C code.
- Documentation for "git log --pretty" options has been updated
to make it easier to translate.
- Instead of three library archives (one for git, one for
reftable, and one for xdiff), roll everything into a single
libgit.a archive. This would help later effort to FFI into
Rust.
- The beginning of SHA1-SHA256 interoperability work.
- Build procedure for a few credential helpers (in contrib/)
have been updated.
- CI improvements to handle the recent Rust integration better.
- The code in "git repack" machinery has been cleaned up to
prepare for incremental update of midx files.
- Two slightly different ways to get at "all the packfiles" in
API has been cleaned up.
- The code to walk revision graph to compute merge base has
been optimized.
- AI guidelines has been added to our documentation set.
- Contributed credential helpers (obviously in contrib/) now
have "cd $there && make install" target.
- The "MyFirstContribution" tutorial tells the reader how to
send out their patches; the section gained a hint to verify
the message reached the mailing list.
- The "debug" ref-backend was missing a method implementation,
which has been corrected.
- Build procedure for Wincred credential helper has been
updated.
- The build procedure based on meson learned to allow builders
to specify the directory to install HTML documents.
- Building "git contacts" script (in contrib/) left the
resulting file unexecutable, which has been corrected.
- Fixes since v2.51 Unless otherwise noted, all the changes in
2.51.X maintenance track, including security updates, are
included in this release.
- During interactive rebase, using 'drop' on a merge commit
lead to an error, which was incorrect.
- "git refs migrate" to migrate the reflog entries from a refs
backend to another had a handful of bugs squashed.
- "git remote rename origin upstream" failed to move
origin/HEAD to upstream/HEAD when origin/HEAD is unborn and
performed other renames extremely inefficiently, which has
been corrected.
- "git describe" has been optimized by using better data
structure.
- "git push" had a code path that led to BUG() but it should
have been a die(), as it is a response to a usual but invalid
end-user action to attempt pushing an object that does not
exist.
- Various bugs about rename handling in "ort" merge strategy
have been fixed.
- "git jump" (in contrib/) fails to parse the diff header
correctly when a file has a space in its name, which has been
corrected.
- "git diff --no-index" run inside a subdirectory under control
of a Git repository operated at the top of the working tree
and stripped the prefix from the output, and oddballs like
"-" (stdin) did not work correctly because of it. Correct
the set-up by undoing what the set-up sequence did to cwd and
prefix.
- Various options to "git diff" that makes comparison ignore
certain aspects of the differences (like "space changes are
ignored", "differences in lines that match these regular
expressions are ignored") did not work well with
"--name-only" and friends.
- The above caused regressions, which has been corrected.
- Documentation for "git rebase" has been updated.
- The start_delayed_progress() function in the progress
eye-candy API did not clear its internal state, making an
initial delay value larger than 1 second ineffective, which
has been corrected.
- The compatObjectFormat extension is used to hide an
incomplete feature that is not yet usable for any purpose
other than developing the feature further. Document it as
such to discourage its use by mere mortals.
- "git log -L..." compared trees of multiple parents with the
tree of the merge result in an unnecessarily inefficient way.
- Under a race against another process that is repacking the
repository, especially a partially cloned one, "git fetch"
may mistakenly think some objects we do have are missing,
which has been corrected.
- "git fetch" can clobber a symref that is dangling when the
remote-tracking HEAD is set to auto update, which has been
corrected.
- "git describe <blob>" misbehaves and/or crashes in some
corner cases, which has been taught to exit with failure
gracefully.
- Manual page for "gitk" is updated with the current
maintainer's name.
- Update the instructions for using GGG in the
MyFirstContribution document to say that a GitHub PR could be
made against `git/git` instead of `gitgitgadget/git`.
- Makefile tried to run multiple "cargo build" which would not
work very well; serialize their execution to work around this
problem.
- "git repack --path-walk" lost objects in some corner cases,
which has been corrected.
- "git ls-files <pathspec>..." should not necessarily have to
expand the index fully if a sparsified directory is excluded
by the pathspec; the code is taught to expand the index on
demand to avoid this.
- Windows "real-time monitoring" interferes with the execution
of tests and affects negatively in both correctness and
performance, which has been disabled in Gitlab CI.
- A broken or malicious "git fetch" can say that it has the
same object for many many times, and the upload-pack serving
it can exhaust memory storing them redundantly, which has
been corrected.
- A corner case bug in "git log -L..." has been corrected.
- "git rev-parse --short" and friends failed to disambiguate
two objects with object names that share common prefix longer
than 32 characters, which has been fixed.
- Some among "git add -p" and friends ignored color.diff and/or
color.ui configuration variables, which is an old regression,
which has been corrected.
- "git subtree" (in contrib/) did not work correctly when
splitting squashed subtrees, which has been improved.
- Import a newer version of the clar unit testing framework.
- "git send-email --compose --reply-to=<address>" used to add
duplicated Reply-To: header, which made mailservers unhappy.
This has been corrected.
- "git rebase -i" failed to clean-up the commit log message
when the command commits the final one in a chain of "fixup"
commands, which has been corrected.
- There are double frees and leaks around setup_revisions() API
used in "git stash show", which has been fixed, and
setup_revisions() API gained a wrapper to make it more
ergonomic when using it with strvec-manged argc/argv pairs.
- Deal more gracefully with directory / file conflicts when the
files backend is used for ref storage, by failing only the
ones that are involved in the conflict while allowing others.
- "git last-modified" operating in non-recursive mode used to
trigger a BUG(), which has been corrected.
- The use of "git config get" command to learn how ANSI color
sequence is for a particular type, e.g., "git config get
--type=color --default=reset no.such.thing", isn't very
ergonomic.
- The "do you still use it?" message given by a command that is
deeply deprecated and allow us to suggest alternatives has
been updated.
- Clang-format update to let our control macros be formatted
the way we had them traditionally, e.g.,
"for_each_string_list_item()" without space before the
parentheses.
- A few places where a size_t value was cast to curl_off_t
without checking has been updated to use the existing helper
function.
- "git reflog write" did not honor the configured
user.name/email which has been corrected.
- Handling of an empty subdirectory of .git/refs/ in the
ref-files backend has been corrected.
- Our CI script requires "sudo" that can be told to preserve
environment, but Ubuntu replaced with "sudo" with an
implementation that lacks the feature. Work this around by
reinstalling the original version.
- The reftable backend learned to sanity check its on-disk data
more carefully.
- A lot of code clean-up of xdiff. Split out of a larger topic.
- "git format-patch --range-diff=... --notes=..." did not drive
the underlying range-diff with correct --notes parameter,
ending up comparing with different set of notes from its main
patch output you would get from "git format-patch
--notes=..." for a singleton patch.
- The code in "git add -p" and friends to iterate over hunks
was riddled with bugs, which has been corrected.
- A few more things that patch authors can do to help
maintainer to keep track of their topics better.
- An earlier addition to "git diff --no-index A B" to limit the
output with pathspec after the two directories misbehaved
when these directories were given with a trailing slash,
which has been corrected.
- The "--short" option of "git status" that meant output for
humans and "-z" option to show NUL delimited output format
did not mix well, and colored some but not all things. The
command has been updated to color all elements consistently
in such a case.
- Unicode width table update.
- GPG signing test set-up has been broken for a year, which has
been corrected.
- Recent OpenSSH creates the Unix domain socket to communicate
with ssh-agent under $HOME instead of /tmp, which causes our
test to fail doe to overly long pathname in our test
environment, which has been worked around by using "ssh-agent
-T".
- strbuf_split*() to split a string into multiple strbufs is
often a wrong API to use. A few uses of it have been removed
by simplifying the code.
- "git shortlog" knows "--committer" and "--author" options,
which the command line completion (in contrib/) did not
handle well, which has been corrected.
- "git bisect" command did not react correctly to "git bisect
help" and "git bisect unknown", which has been corrected.
- The 'q'(uit) command in "git add -p" has been improved to
quit without doing any meaningless work before leaving, and
giving EOF (typically control-D) to the prompt is made to
behave the same way.
- The wildmatch code had a corner case bug that mistakenly
makes "foo**/bar" match with "foobar", which has been
corrected.
- Tests did not set up GNUPGHOME correctly, which is fixed but
some flaky tests are exposed in t1016, which needs to be
addressed before this topic can move forward.
- The patterns used in the .gitignore files use backslash in
the way documented for fnmatch(3); document as such to reduce
confusion.
- drop
0001-t7528-work-around-ETOOMANY-in-OpenSSH-10.1-and-newer.patch
- refreshed CVE-2024-24577.patch
-------------------------------------------------------------------
Fri Oct 31 13:06:34 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
- Add patch from upstream to fix a test that fails with
openssh 10.1:
* 0001-t7528-work-around-ETOOMANY-in-OpenSSH-10.1-and-newer.patch
-------------------------------------------------------------------
Thu Oct 16 14:08:59 UTC 2025 - Antonio Teixeira <antonio.teixeira@suse.com>
- Update to 2.51.1:
- Fixes since Git 2.51.0
* The "do you still use it?" message given by a command that is
deeply deprecated and allow us to suggest alternatives has been
updated.
* The compatObjectFormat extension is used to hide an incomplete
feature that is not yet usable for any purpose other than
developing the feature further. Document it as such to discourage
its use by mere mortals.
* Manual page for "gitk" is updated with the current maintainer's
name.
* Update the instructions for using GGG in the MyFirstContribution
document to say that a GitHub PR could be made against `git/git`
instead of `gitgitgadget/git`.
* Clang-format update to let our control macros be formatted the way we
had them traditionally, e.g., "for_each_string_list_item()" without
space before the parentheses.
* A few places where a size_t value was cast to curl_off_t without
checking has been updated to use the existing helper function.
* The start_delayed_progress() function in the progress eye-candy API
did not clear its internal state, making an initial delay value
larger than 1 second ineffective, which has been corrected.
* Makefile tried to run multiple "cargo build" which would not work
very well; serialize their execution to work around this problem.
* Adjust to the way newer versions of cURL selectively enable tracing
options, so that our tests can continue to work.
* During interactive rebase, using 'drop' on a merge commit led to
an error, which has been corrected.
* "git refs migrate" to migrate the reflog entries from a refs
backend to another had a handful of bugs squashed.
* "git push" had a code path that led to BUG() but it should have
been a die(), as it is a response to a usual but invalid end-user
action to attempt pushing an object that does not exist.
* Various bugs about rename handling in "ort" merge strategy have
been fixed.
* "git diff --no-index" run inside a subdirectory under control of a
Git repository operated at the top of the working tree and stripped
the prefix from the output, and oddballs like "-" (stdin) did not
work correctly because of it. Correct the set-up by undoing what
the set-up sequence did to cwd and prefix.
* Various options to "git diff" that make comparison ignore certain
aspects of the differences (like "space changes are ignored",
"differences in lines that match these regular expressions are
ignored") did not work well with "--name-only" and friends.
* Under a race against another process that is repacking the
repository, especially a partially cloned one, "git fetch" may
mistakenly think some objects we do have are missing, which has
been corrected.
* "git repack --path-walk" lost objects in some corner cases, which
has been corrected.
cf. <CABPp-BHFxxGrqKc0m==TjQNjDGdO=H5Rf6EFsf2nfE1=TuraOQ@mail.gmail.com>
* Fixes multiple crashes around midx write-out codepaths.
* A broken or malicious "git fetch" can say that it has the same
object for many many times, and the upload-pack serving it can
exhaust memory storing them redundantly, which has been corrected.
* A corner case bug in "git log -L..." has been corrected.
* Some among "git add -p" and friends ignored color.diff and/or
color.ui configuration variables, which is an old regression, which
has been corrected.
* "git rebase -i" failed to clean-up the commit log message when the
command commits the final one in a chain of "fixup" commands, which
has been corrected.
* Deal more gracefully with directory / file conflicts when the files
backend is used for ref storage, by failing only the ones that are
involved in the conflict while allowing others.
-------------------------------------------------------------------
Wed Aug 20 14:22:54 UTC 2025 - Antonio Teixeira <antonio.teixeira@suse.com>
- Use zlib instead of zlib-ng for SLES16
-------------------------------------------------------------------
Mon Aug 18 18:38:01 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
- Update to 2.51.0
- UI, Workflows & Features
- Userdiff patterns for the R language have been added.
- Documentation for "git send-email" has been updated with a
bit more credential helper and OAuth information.
- "git cat-file --batch" learns to understand %(objectmode)
atom to allow the caller to tell missing objects (due to
repository corruption) and submodules (whose commit objects
are OK to be missing) apart.
- "git diff --no-index dirA dirB" can limit the comparison with
pathspec at the end of the command line, just like normal
"git diff".
- "git subtree" (in contrib/) learned to grok GPG signing its
commits.
- "git whatchanged" that is longer to type than "git log --raw"
which is its modern rough equivalent has outlived its
usefulness more than 10 years ago. Plan to deprecate and
remove it.
- An interchange format for stash entries is defined, and
subcommand of "git stash" to import/export has been added.
- "git merge/pull" has been taught the "--compact-summary"
option to use the compact-summary format, intead of diffstat,
when showing the summary of the incoming changes.
- "git imap-send" has been broken for a long time, which has
been resurrected and then taught to talk OAuth2.0 etc.
- Some error messages from "git imap-send" has been updated.
- When "git daemon" sees a signal while attempting to accept()
a new client, instead of retrying, it skipped it by mistake,
which has been corrected.
- The reftable ref backend has matured enough; Git 3.0 will
make it the default format in a newly created repositories by
default.
- "netrc" credential helper has been improved to understand
textual service names (like smtp) in addition to the numeric
port numbers (like 25).
- Lift the limitation to use changed-path filter in "git log"
so that it can be used for a pathspec with multiple literal
paths.
- Clean up the way how signature on commit objects are exported
to and imported from fast-import stream.
- Remove unsupported, unused, and unsupportable old option from
"git log".
- Document recently added "git imap-send --list" with an
example.
- "git pull" learned to pay attention to pull.autostash
configuration variable, which overrides
rebase/merge.autostash.
- "git for-each-ref" learns "--start-after" option to help
applications that want to page its output.
- "git switch" and "git restore" are declared to be no longer
experimental.
- "git -c alias.foo=bar foo -h baz" reported "'foo' is aliased
to 'bar'" and then went on to run "git foo -h baz", which was
unexpected. Tighten the rule so that alias expansion is
reported only when "-h" is the sole option.
- Performance, Internal Implementation, Development Support etc.
- "git pack-objects" learned to find delta bases from blobs at
the same path, using the --path-walk API.
- CodingGuidelines update.
- Add settings for Solaris 10 & 11.
- Meson-based build/test framework now understands TAP output
generated by our tests.
- "Do not explicitly initialize to zero" rule has been
clarified in the CodingGuidelines document.
- A test helper "test_seq" function learned the "-f <fmt>"
option, which allowed us to simplify a lot of test scripts.
- A lot of stale stuff has been removed from the contrib/
hierarchy.
- "git push" and "git fetch" are taught to update refs in
batches to gain performance.
- Some code paths in "git prune" used to ignore the passed-in
repository object and used the `the_repository` singleton
instance instead, which has been corrected.
- Update ".clang-format" and ".editorconfig" to match our style
guide a bit better.
- "make coccicheck" succeeds even when spatch made suggestions,
which has been updated to fail in such a case.
- Code clean-up around object access API.
- Define .precision to more canned parse-options type to avoid
bugs coming from using a variable with a wrong type to
capture the parsed values.
- Flipping the default hash function to SHA-256 at Git 3.0
boundary is planned.
- Declare weather-balloon we raised for "bool" type 18 months
ago a success and officially allow using the type in our
codebase.
- GIT_TEST_INSTALLED was not honored in the recent topic
related to SHA256 hashes, which has been corrected.
- The pop_most_recent_commit() function can have quite
expensive worst case performance characteristics, which has
been optimized by using prio-queue data structure.
- Move structure definition from unrelated header file to where
it belongs.
- To help our developers, document what C99 language features
are being considered for adoption, in addition to what past
experiments have already decided.
- The reftable unit tests are now ported to the "clar" unit
testing framework.
- Redefine where the multi-pack-index sits in the object
subsystem, which recently was restructured to allow multiple
backends that support a single object source that belongs to
one repository. A MIDX does span multiple "object sources".
- Reduce implicit assumption and dependence on the_repository
in the object-file subsystem.
- Fixes since v2.50 Unless otherwise noted, all the changes in
2.50.X maintenance track, including security updates, are
included in this release.
- A memory-leak in an error code path has been plugged. (merge
7082da85cb ly/commit-graph-graph-write-leakfix later to
maint).
- A memory-leak in an error code path has been plugged. (merge
aedebdb6b9 ly/fetch-pack-leakfix later to maint).
- Some leftover references to documentation source files that
no longer exist, due to recent ".txt" -> ".adoc" renaming,
have been corrected. (merge 3717a5775a
jw/doc-txt-to-adoc-refs later to maint).
- "git stash -p <pathspec>" improvements. (merge 468817bab2
pw/stash-p-pathspec-fixes later to maint).
- "git send-email" incremented its internal message counter
when a message was edited, which made logic that treats the
first message specially misbehave, which has been corrected.
(merge 2cc27b3501 ag/send-email-edit-threading-fix later to
maint).
- "git stash" recorded a wrong branch name when submodules are
present in the current checkout, which has been corrected.
(merge ffb36c64f2 kj/stash-onbranch-submodule-fix later to
maint).
- When asking to apply mailmap to both author and committer
field while showing a commit object, the field that appears
later was not correctly parsed and replaced, which has been
corrected. (merge abf94a283f sa/multi-mailmap-fix later to
maint).
- "git maintenance" lacked the care "git gc" had to avoid
holding onto the repository lock for too long during packing
refs, which has been remedied. (merge 1b5074e614
ps/maintenance-ref-lock later to maint).
- Avoid regexp_constraint and instead use comparison_constraint
when listing functions to exclude from application of
coccinelle rules, as spatch can be built with different
regexp engine X-<. (merge f2ad545813
jc/cocci-avoid-regexp-constraint later to maint).
- Updating submodules from the upstream did not work well when
submodule's HEAD is detached, which has been improved. (merge
ca62f524c1 jk/submodule-remote-lookup-cleanup later to
maint).
- Remove unnecessary check from "git daemon" code. (merge
0c856224d2 cb/daemon-fd-check-fix later to maint).
- Use of sysctl() system call to learn the total RAM size used
on BSDs has been corrected. (merge 781c1cf571
cb/total-ram-bsd-fix later to maint).
- Drop FreeBSD 4 support and declare that we support only
FreeBSD 12 or later, which has memmem() supported. (merge
0392f976a7 bs/config-mak-freebsd later to maint).
- A diff-filter with negative-only specification like "git log
--diff-filter=d" did not trigger correctly, which has been
fixed. (merge 375ac087c5 jk/all-negative-diff-filter-fix
later to maint).
- A failure to open the index file for writing due to
conflicting access did not state what went wrong, which has
been corrected. (merge 9455397a5c
hy/read-cache-lock-error-fix later to maint).
- Tempfile removal fix in the codepath to sign commits with SSH
keys. (merge 4498127b04 re/ssh-sign-buffer-fix later to
maint).
- Code and test clean-up around string-list API. (merge
6e5b26c3ff sj/string-list later to maint).
- "git apply -N" should start from the current index and
register only new files, but it instead started from an empty
index, which has been corrected. (merge 2b49d97fcb
rp/apply-intent-to-add-fix later to maint).
- Leakfix with a new and a bit invasive test on pack-bitmap
files. (merge bfd5522e98 ly/load-bitmap-leakfix later to
maint).
- "git fetch --prune" used to be O(n^2) expensive when there
are many refs, which has been corrected. (merge 87d8d8c5d0
ph/fetch-prune-optim later to maint).
- When a ref creation at refs/heads/foo/bar fails, the files
backend now removes refs/heads/foo/ if the directory is
otherwise not used. (merge a3a7f20516
ps/refs-files-remove-empty-parent later to maint).
- "pack-objects" has been taught to avoid pointing into objects
in cruft packs from midx.
- "git remote" now detects remote names that overlap with each
other (e.g., remote nickname "outer" and "outer/inner" are
used at the same time), as it will lead to overlapping
remote-tracking branches. (merge a5a727c448
jk/remote-avoid-overlapping-names later to maint).
- The gpg.program configuration variable, which names a
pathname to the (custom) GPG compatible program, can now be
spelled with ~tilde expansion. (merge 7d275cd5c0
jb/gpg-program-variable-is-a-pathname later to maint).
- Our <sane-ctype.h> header file relied on that the
system-supplied <ctype.h> header is not later included, which
would override our macro definitions, but "amazon linux"
broke this assumption. Fix this by preemptively including
<ctype.h> near the beginning of <sane-ctype.h> ourselves.
(merge 9d3b33125f ps/sane-ctype-workaround later to maint).
- Clean-up compat/bswap.h mess. (merge f4ac32c03a
ss/compat-bswap-revamp later to maint).
- Meson-based build did not handle libexecdir setting
correctly, which has been corrected. (merge 056dbe8612
rj/meson-libexecdir-fix later to maint).
- Document that we do not require "real" name when signing your
patches off. (merge 1f0fed312a
bc/contribution-under-non-real-names later to maint).
- "git commit" that concludes a conflicted merge failed to
notice and remove existing comment added automatically (like
"# Conflicts:") when the core.commentstring is set to 'auto'.
(merge 92b7c7c9f5 ac/auto-comment-char-fix later to maint).
- "git rebase -i" with bogus rebase.instructionFormat
configuration failed to produce the todo file after recording
the state files, leading to confused "git status"; this has
been corrected. (merge ade14bffd7
ow/rebase-verify-insn-fmt-before-initializing-state later to
maint).
- A few file descriptors left unclosed upon program completion
in a few test helper programs are now closed. (merge
0f1b33815b hl/test-helper-fd-close later to maint).
- Interactive prompt code did not correctly strip CRLF from the
end of line on Windows. (merge 711a20827b js/prompt-crlf-fix
later to maint).
- The config API had a set of convenience wrapper functions
that implicitly use the_repository instance; they have been
removed and inlined at the calling sites.
- "git add/etc -p" now honor the diff.context configuration
variable, and also they learn to honor the -U<n> command-line
option. (merge 2b3ae04011 lm/add-p-context later to maint).
- The case where a new submodule takes a path where there used
to be a completely different subproject is now dealt with a
bit better than before. (merge 5ed8c5b465
kj/renamed-submodule later to maint).
- The deflate codepath in "git archive --format=zip" had a
longstanding bug coming from misuse of zlib API, which has
been corrected.
- drop patches included in update:
0001-git-gui-Replace-null_sha1-with-nullid.patch
0001-gitk-Add-support-of-SHA256-repo.patch
0002-git-gui-Add-support-of-SHA256-repo.patch
- refreshed patches:
CVE-2024-24577.patch
completion-wordbreaks.diff
git-tcsh-completion-fixes.diff
setup-don-t-fail-if-commondir-reference-is-deleted.patch
- contrib/workdir is dropped. remove references for it.
-------------------------------------------------------------------
Tue Jul 15 13:20:32 UTC 2025 - Takashi Iwai <tiwai@suse.com>
- update git-gui sha256 patches after the upstream review:
0001-git-gui-Replace-null_sha1-with-nullid.patch
0002-git-gui-Add-support-of-SHA256-repo.patch
-------------------------------------------------------------------
Wed Jul 9 11:01:47 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
@@ -8,7 +664,7 @@ Wed Jul 9 11:01:47 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
-------------------------------------------------------------------
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
- 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,
@@ -119,7 +775,7 @@ Fri Mar 14 23:43:43 UTC 2025 - Marcus Rueckert <mrueckert@suse.de>
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:
* CVE-2024-50349, CVE-2024-52006:
refuse to accept URLs that contain control sequences
-------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
#
# spec file for package git
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
@@ -43,7 +43,7 @@
%bcond_with asciidoctor
%endif
Name: git
Version: 2.50.1
Version: 2.52.0
Release: 0
Summary: Fast, scalable, distributed revision control system
License: GPL-2.0-only
@@ -70,9 +70,6 @@ Patch8: git-asciidoc.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
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: gpg2
BuildRequires: libcurl-devel
@@ -89,7 +86,7 @@ BuildRequires: systemd-rpm-macros
BuildRequires: tcsh
BuildRequires: update-desktop-files
BuildRequires: xz
%if 0%{?suse_version} >= 1600
%if 0%{?suse_version} > 1600
BuildRequires: pkgconfig(zlib-ng)
%else
BuildRequires: pkgconfig(zlib)
@@ -414,8 +411,6 @@ install -m 644 %{SOURCE12} %{buildroot}/%{_sysconfdir}/bash_completion.d/git-pro
%if %{with git_libsecret}
install -m 755 -D contrib/credential/libsecret/git-credential-libsecret %{buildroot}/%{gitexecdir}/git-credential-libsecret
%endif
# contrib/workdir
install -m 755 -D contrib/workdir/git-new-workdir %{buildroot}/%{_bindir}
# process tcsh completion
(cd contrib/completion
mkdir -p %{buildroot}%{_datadir}/tcsh
@@ -577,7 +572,6 @@ fi
%dir %{gitexecdir}
%dir %{gitexecdir}/mergetools
%{gitexecdir}/mergetools/guiffy
%{_bindir}/git-new-workdir
%{_datadir}/bash-completion/completions/*
%{_sysconfdir}/bash_completion.d/git-prompt
%{_datadir}/tcsh

View File

@@ -28,11 +28,11 @@ v3:
setup.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
Index: git-2.43.1/setup.c
Index: git/setup.c
===================================================================
--- git-2.43.1.orig/setup.c
+++ git-2.43.1/setup.c
@@ -316,12 +316,20 @@ int get_common_dir_noenv(struct strbuf *
--- git.orig/setup.c
+++ git/setup.c
@@ -327,12 +327,20 @@ int get_common_dir_noenv(struct strbuf *
{
struct strbuf data = STRBUF_INIT;
struct strbuf path = STRBUF_INIT;
@@ -56,7 +56,7 @@ Index: git-2.43.1/setup.c
while (data.len && (data.buf[data.len - 1] == '\n' ||
data.buf[data.len - 1] == '\r'))
data.len--;
@@ -332,8 +340,6 @@ int get_common_dir_noenv(struct strbuf *
@@ -343,8 +351,6 @@ int get_common_dir_noenv(struct strbuf *
strbuf_addbuf(&path, &data);
strbuf_add_real_path(sb, path.buf);
ret = 1;