MSYS2-packages/git/git-2.43.0-git-gui.patch
Christoph Reiter df438d69c8
git: Update to 2.51.0 (#5575)
git-2.43.0-git-gui.patch: refresh

the two remote scripts were dropped upstream with
https://github.com/git/git/commit/9a5e587d47c8d973d3484
2025-08-19 07:55:56 +02:00

54 lines
1.4 KiB
Diff

--- git-2.51.0/git-gui/git-gui.sh.orig 2025-08-18 02:18:23.000000000 +0200
+++ git-2.51.0/git-gui/git-gui.sh 2025-08-18 21:04:23.387867700 +0200
@@ -93,6 +93,11 @@
}
}
+proc is_CygwinGit {} {
+ # Cygwin git running with Windows Tcl/Tk
+ return 1
+}
+
######################################################################
##
## PATH lookup. Sanitize $PATH, assure exec/open use only that
@@ -268,7 +273,11 @@
if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
set oguilib $::env(GIT_GUI_LIB_DIR)
} else {
- set oguilib {@@GITGUI_LIBDIR@@}
+ if {[is_Windows] && [is_CygwinGit]} {
+ set oguilib [exec cygpath --windows --absolute {@@GITGUI_LIBDIR@@}]
+ } else {
+ set oguilib {@@GITGUI_LIBDIR@@}
+ }
}
set oguirel {@@GITGUI_RELATIVE@@}
if {$oguirel eq {1}} {
@@ -1183,7 +1192,11 @@
load_config 0
apply_config
-set _gitworktree [git rev-parse --show-toplevel]
+if {[is_Windows] && [is_CygwinGit]} {
+ set _gitworktree [exec cygpath --windows [git rev-parse --show-toplevel]]
+} else {
+ set _gitworktree [git rev-parse --show-toplevel]
+}
if {$_prefix ne {}} {
if {$_gitworktree eq {}} {
@@ -2123,7 +2136,11 @@
if {[is_Cygwin]} {
set explorer "/bin/cygstart.exe --explore"
} elseif {[is_Windows]} {
- set explorer "explorer.exe"
+ if {[is_CygwinGit]} {
+ set explorer [_which "explorer"]
+ } else {
+ set explorer "explorer.exe"
+ }
} elseif {[is_MacOSX]} {
set explorer "open"
} else {