* [PATCH 1/5] git-gui: remove uname_O in Makefile
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
@ 2025-07-30 16:40 ` Carlo Marcelo Arenas Belón
2025-07-30 20:07 ` Junio C Hamano
2025-07-30 16:40 ` [PATCH 2/5] git-gui: fix dependency of GITGUI_MAIN on generator Carlo Marcelo Arenas Belón
` (7 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-30 16:40 UTC (permalink / raw)
To: git
Cc: Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt, Carlo Marcelo Arenas Belón
Last used in ae49066 (git gui Makefile - remove Cygwin modifications,
2023-06-26), and unused since.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 315888f..a87dc06 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,6 @@ GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN . $@
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
SCRIPT_SH = git-gui.sh
--
2.50.1.475.g795bb014d8
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH 1/5] git-gui: remove uname_O in Makefile
2025-07-30 16:40 ` [PATCH 1/5] git-gui: remove uname_O in Makefile Carlo Marcelo Arenas Belón
@ 2025-07-30 20:07 ` Junio C Hamano
0 siblings, 0 replies; 25+ messages in thread
From: Junio C Hamano @ 2025-07-30 20:07 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belón
Cc: git, Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
> Last used in ae49066 (git gui Makefile - remove Cygwin modifications,
> 2023-06-26), and unused since.
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
> Makefile | 1 -
> 1 file changed, 1 deletion(-)
An obvious improvement ;-).
> diff --git a/Makefile b/Makefile
> index 315888f..a87dc06 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -11,7 +11,6 @@ GIT-VERSION-FILE: FORCE
> @$(SHELL_PATH) ./GIT-VERSION-GEN . $@
>
> uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
> -uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
> uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
>
> SCRIPT_SH = git-gui.sh
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 2/5] git-gui: fix dependency of GITGUI_MAIN on generator
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
2025-07-30 16:40 ` [PATCH 1/5] git-gui: remove uname_O in Makefile Carlo Marcelo Arenas Belón
@ 2025-07-30 16:40 ` Carlo Marcelo Arenas Belón
2025-07-30 16:40 ` [PATCH 3/5] git-gui: retire Git Gui.app Carlo Marcelo Arenas Belón
` (6 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-30 16:40 UTC (permalink / raw)
To: git
Cc: Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt, Carlo Marcelo Arenas Belón
Since 854e883 (git-gui: extract script to generate "git-gui",
2025-03-11), the logic to generate the main script was pulled
out of the Makefile, but adding the resulting generator as a
dependency was missed.
If the logic changes, the main script should be regenerated, so
add it as a dependency.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index a87dc06..179857d 100644
--- a/Makefile
+++ b/Makefile
@@ -168,7 +168,7 @@ git-gui: windows/git-gui.sh
cp $< $@
endif
-$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
+$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS generate-git-gui.sh
$(QUIET_GEN)$(SHELL_PATH) generate-git-gui.sh "$<" "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
XGETTEXT ?= xgettext
--
2.50.1.475.g795bb014d8
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH 3/5] git-gui: retire Git Gui.app
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
2025-07-30 16:40 ` [PATCH 1/5] git-gui: remove uname_O in Makefile Carlo Marcelo Arenas Belón
2025-07-30 16:40 ` [PATCH 2/5] git-gui: fix dependency of GITGUI_MAIN on generator Carlo Marcelo Arenas Belón
@ 2025-07-30 16:40 ` Carlo Marcelo Arenas Belón
2025-07-30 16:40 ` [PATCH 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass Carlo Marcelo Arenas Belón
` (5 subsequent siblings)
8 siblings, 0 replies; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-30 16:40 UTC (permalink / raw)
To: git
Cc: Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt, Carlo Marcelo Arenas Belón
In a recent commit, the minimum version of Tcl/Tk was raised to
8.6, but the "app" relies on the system provided Framework that
is based on 8.5.
Remove it, and let git-gui use a third party version of Wish if
available.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
.gitignore | 1 -
GIT-GUI-BUILD-OPTIONS.in | 1 -
Makefile | 51 ----------------------------------
generate-macos-app.sh | 30 --------------------
generate-macos-wrapper.sh | 35 -----------------------
macosx/AppMain.tcl | 29 -------------------
macosx/Info.plist | 30 --------------------
macosx/git-gui.icns | Bin 28866 -> 0 bytes
meson.build | 57 --------------------------------------
9 files changed, 234 deletions(-)
delete mode 100755 generate-macos-app.sh
delete mode 100755 generate-macos-wrapper.sh
delete mode 100644 macosx/AppMain.tcl
delete mode 100644 macosx/Info.plist
delete mode 100644 macosx/git-gui.icns
diff --git a/.gitignore b/.gitignore
index ff6e0be..ba845f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
.DS_Store
config.mak
-Git Gui.app*
git-gui.tcl
GIT-GUI-BUILD-OPTIONS
GIT-VERSION-FILE
diff --git a/GIT-GUI-BUILD-OPTIONS.in b/GIT-GUI-BUILD-OPTIONS.in
index 5fd885c..3c112af 100644
--- a/GIT-GUI-BUILD-OPTIONS.in
+++ b/GIT-GUI-BUILD-OPTIONS.in
@@ -4,4 +4,3 @@ GITGUI_RELATIVE=@GITGUI_RELATIVE@
SHELL_PATH=@SHELL_PATH@
TCLTK_PATH=@TCLTK_PATH@
TCL_PATH=@TCL_PATH@
-TKEXECUTABLE=@TKEXECUTABLE@
diff --git a/Makefile b/Makefile
index 179857d..2ac5f44 100644
--- a/Makefile
+++ b/Makefile
@@ -52,8 +52,6 @@ INSTALL_R0 = $(INSTALL) -m 644 # space is required here
INSTALL_R1 =
INSTALL_X0 = $(INSTALL) -m 755 # space is required here
INSTALL_X1 =
-INSTALL_A0 = find # space is required here
-INSTALL_A1 = | cpio -pud
INSTALL_L0 = rm -f # space is required here
INSTALL_L1 = && ln # space is required here
INSTALL_L2 =
@@ -78,8 +76,6 @@ ifndef V
INSTALL_R1 = && echo ' ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
INSTALL_X0 = src=
INSTALL_X1 = && echo ' ' INSTALL 755 `basename $$src` && $(INSTALL) -m 755 $$src
- INSTALL_A0 = src=
- INSTALL_A1 = && echo ' ' INSTALL ' ' `basename "$$src"` && find "$$src" | cpio -pud
INSTALL_L0 = dst=
INSTALL_L1 = && src=
@@ -100,18 +96,6 @@ else
TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
endif
-ifeq ($(uname_S),Darwin)
- TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app
- ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n)
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish.app
- ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n)
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\ Shell.app
- endif
- endif
- TKEXECUTABLE = $(TKFRAMEWORK)/Contents/MacOS/$(shell basename "$(TKFRAMEWORK)" .app)
- TKEXECUTABLE_SQ = $(subst ','\'',$(TKEXECUTABLE))
-endif
-
ifeq ($(findstring $(firstword -$(MAKEFLAGS)),s),s)
QUIET_GEN =
endif
@@ -129,16 +113,10 @@ libdir_SQ = $(subst ','\'',$(gg_libdir))
exedir = $(dir $(gitexecdir))share/git-gui/lib
GITGUI_RELATIVE :=
-GITGUI_MACOSXAPP :=
ifeq ($(exedir),$(gg_libdir))
GITGUI_RELATIVE := 1
endif
-ifeq ($(uname_S),Darwin)
- ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
- GITGUI_MACOSXAPP := YesPlease
- endif
-endif
ifneq (,$(findstring MINGW,$(uname_S)))
ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
NO_MSGFMT=1
@@ -147,20 +125,6 @@ endif
GITGUI_RELATIVE := 1
endif
-ifdef GITGUI_MACOSXAPP
-GITGUI_MAIN := git-gui.tcl
-
-git-gui: generate-macos-wrapper.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-wrapper.sh "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-
-Git\ Gui.app: GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS \
- macosx/Info.plist \
- macosx/git-gui.icns \
- macosx/AppMain.tcl \
- $(TKEXECUTABLE)
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-app.sh . "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-endif
-
ifdef GITGUI_WINDOWS_WRAPPER
GITGUI_MAIN := git-gui.tcl
@@ -205,14 +169,10 @@ GIT-GUI-BUILD-OPTIONS: FORCE
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
-e 's|@TCLTK_PATH@|$(TCLTK_PATH_SQ)|' \
-e 's|@TCL_PATH@|$(TCL_PATH_SQ)|' \
- -e 's|@TKEXECUTABLE@|$(TKEXECUTABLE_SQ)|' \
$@.in >$@+
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
-ifdef GITGUI_MACOSXAPP
-all:: git-gui Git\ Gui.app
-endif
ifdef GITGUI_WINDOWS_WRAPPER
all:: git-gui
endif
@@ -228,10 +188,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
endif
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
-ifdef GITGUI_MACOSXAPP
- $(QUIET)$(INSTALL_A0)'Git Gui.app' $(INSTALL_A1) '$(DESTDIR_SQ)$(libdir_SQ)'
- $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
-endif
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
@@ -246,10 +202,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
endif
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(libdir_SQ)'
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/tclIndex $(REMOVE_F1)
-ifdef GITGUI_MACOSXAPP
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)/Git Gui.app' $(REMOVE_F1)
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/git-gui.tcl $(REMOVE_F1)
-endif
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(msgsdir_SQ)'
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
@@ -265,9 +217,6 @@ dist-version: GIT-VERSION-FILE
clean::
$(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
-ifdef GITGUI_MACOSXAPP
- $(RM_RF) 'Git Gui.app'* git-gui
-endif
ifdef GITGUI_WINDOWS_WRAPPER
$(RM_RF) git-gui
endif
diff --git a/generate-macos-app.sh b/generate-macos-app.sh
deleted file mode 100755
index 71b9fa6..0000000
--- a/generate-macos-app.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-set -e
-
-SOURCE_DIR="$1"
-OUTPUT="$2"
-BUILD_OPTIONS="$3"
-VERSION_FILE="$4"
-
-. "$BUILD_OPTIONS"
-. "$VERSION_FILE"
-
-rm -rf "$OUTPUT" "$OUTPUT+"
-
-mkdir -p "$OUTPUT+/Contents/MacOS"
-mkdir -p "$OUTPUT+/Contents/Resources/Scripts"
-
-cp "$TKEXECUTABLE" "$OUTPUT+/Contents/MacOS"
-cp "$SOURCE_DIR/macosx/git-gui.icns" "$OUTPUT+/Contents/Resources"
-sed \
- -e "s/@@GITGUI_VERSION@@/$GITGUI_VERSION/g" \
- -e "s/@@GITGUI_TKEXECUTABLE@@/$(basename "$TKEXECUTABLE")/g" \
- "$SOURCE_DIR/macosx/Info.plist" \
- >"$OUTPUT+/Contents/Info.plist"
-sed \
- -e "s|@@gitexecdir@@|$GITGUI_GITEXECDIR|" \
- -e "s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
- "$SOURCE_DIR/macosx/AppMain.tcl" \
- >"$OUTPUT+/Contents/Resources/Scripts/AppMain.tcl"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/generate-macos-wrapper.sh b/generate-macos-wrapper.sh
deleted file mode 100755
index 0304937..0000000
--- a/generate-macos-wrapper.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if test "$#" -ne 3
-then
- echo >&2 "usage: $0 <OUTPUT> <BUILD_OPTIONS> <VERSION_FILE>"
- exit 1
-fi
-
-OUTPUT="$1"
-BUILD_OPTIONS="$2"
-VERSION_FILE="$3"
-
-. "$BUILD_OPTIONS"
-
-rm -f "$OUTPUT" "$OUTPUT+"
-
-(
- echo "#!$SHELL_PATH"
- cat "$BUILD_OPTIONS" "$VERSION_FILE"
- cat <<-'EOF'
- if test "z$*" = zversion ||
- test "z$*" = z--version
- then
- echo "git-gui version $GITGUI_VERSION"
- else
- libdir="${GIT_GUI_LIB_DIR:-$GITGUI_LIBDIR}"
- exec "$libdir/Git Gui.app/Contents/MacOS/$(basename "$TKEXECUTABLE")" "$0" "$@"
- fi
- EOF
-) >"$OUTPUT+"
-
-chmod +x "$OUTPUT+"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/macosx/AppMain.tcl b/macosx/AppMain.tcl
deleted file mode 100644
index b6c6dc3..0000000
--- a/macosx/AppMain.tcl
+++ /dev/null
@@ -1,29 +0,0 @@
-set gitexecdir {@@gitexecdir@@}
-if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
- set gitguilib $::env(GIT_GUI_LIB_DIR)
-} else {
- set gitguilib {@@GITGUI_LIBDIR@@}
-}
-
-set env(PATH) "$gitexecdir:$env(PATH)"
-
-if {[string first -psn [lindex $argv 0]] == 0} {
- lset argv 0 [file join $gitexecdir git-gui]
-}
-
-if {[file tail [lindex $argv 0]] eq {gitk}} {
- set argv0 [lindex $argv 0]
- set AppMain_source $argv0
-} else {
- set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
- set AppMain_source [file join $gitguilib git-gui.tcl]
- if {[info exists env(PWD)]} {
- cd $env(PWD)
- } elseif {[pwd] eq {/}} {
- cd $env(HOME)
- }
-}
-
-unset gitexecdir gitguilib
-set argv [lrange $argv 1 end]
-source $AppMain_source
diff --git a/macosx/Info.plist b/macosx/Info.plist
deleted file mode 100644
index 1ade121..0000000
--- a/macosx/Info.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>@@GITGUI_TKEXECUTABLE@@</string>
- <key>CFBundleGetInfoString</key>
- <string>Git Gui @@GITGUI_VERSION@@ © 2006-2007 Shawn Pearce, et. al.</string>
- <key>CFBundleIconFile</key>
- <string>git-gui.icns</string>
- <key>CFBundleIdentifier</key>
- <string>cz.or.repo.git-gui</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>Git Gui</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>@@GITGUI_VERSION@@</string>
- <key>CFBundleSignature</key>
- <string>GITg</string>
- <key>CFBundleVersion</key>
- <string>@@GITGUI_VERSION@@</string>
- <key>NSHighResolutionCapable</key>
- <true/>
-</dict>
-</plist>
diff --git a/macosx/git-gui.icns b/macosx/git-gui.icns
deleted file mode 100644
index 77d88a77a7669667335cf6fd5767c8b40f3ce6e7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 28866
zcmeHP4O~>^nt#p=2y%5T_jlc}63a@{yjiYES8sx8l*`r3bS<N7-Fab<0Yn3@rVPW3
zAdF%<_<<U?F2zb}wPF5D5mD5uS9DEF>S{u2t2L5Yu9oH5|2gx)IfpX?!;ILidHnHy
zJYWCk{W$M=&wHGspO!k4D1E1X+RQ#g^f+hajNLADyWq;{LKteUe_;(SzAIPC^)m-Q
zNW>k@C5<`e$pSIWqwoQvMm-u6GiuaRW(uD^c5Hl1?AWnW^ISUFlT-7ER+)RyI5W{^
zb3KJvNL%=@*=+1Zi74Kkw)TLL(Oe6K&Cy33U~jWCa1_Dz(LuJgBo*aYcATOkXdOej
zA}!+qq93MbLcP0=84OG}XaR*z&reCoOE(chTUC7?p&><R*1EdCRoB$jU4i9TyZwvm
z-FAB~gyzs$)a8!|ZLm3xCW)a%)5ry+$v%A8c#-Z8bYy1Y;$J8f62w(Je*Ba1@#Dw;
z2jXf>NSG2oHX$J+Ul1bn{`y>mRb!5(Q3&e=^FSJcutwL^7{8|b0v*=OXv1`jX*lKw
zD3U+mC^%DD{dT*(iN9*M?{W%z*42H;U#hFCXf~1QgWY}8D-z*u2mQs#>diaoh_lZ9
zrpJR1>U6sCE|dHJw`@LC{>LT%@Y0L(`DH(*JL{3Wk>>H;%Fj9LQT$8PIg(cL&bsz&
z!|yP>7d~~?>G^BC-Om3s(N(9oZB6I5KPFb6cyuhT5%hz02g&|;o;c?pA(zPnU5Q-K
z6R9)uKj3d3{(ibf^v!2PjfaS9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`
zkmoOskveLDPc-JDRDZZsyItkjCaJ%#<#S2}pC(E5>)M4WH5w;%XIFf1Pz^uI`MY(|
z?z_=aU+pQ&@b@b`sNvI{CnX{Kz5kMJ@%pp{pKKERn%fj6zE&l^c)o4;eWW(>3F9le
z{Q37KPGPUw{}k!?<c=eX9EFLmRcTu?l*a1#lp!@z+W1(Py87ASuWF9&v}CF2u=aO(
z<%El*5BeR3?_n&1_|5Zz_s~aeWlKEqE#|)mC)cb0S4VgNl(YNDb_{Zv&oycLTdcq8
z-el{qzx^+K2H8zdr~@jvyWILhK_T?DD!cz4ZHx6|(k)nE@vj(L|G855a#{0J+7hxC
zodHK=?krwZ9U_ZNpZE9vOY;5a_j5wMM-bsYqY>lyUbbKLZmKSwrua$_J`&=EZrv_#
zzTf*Vd?7{d@uyi{;AicYEAs)se?;N(+K&^RkAKQQqOHOgqoiclD0O_V50^T0l=qaB
zM73}<zeM-|n4J9GeF-3;newwA2g3Ptryg!5{ke1JoL{Jt25`pppx7c<pBS<=Q0l+6
za)D1U9+gLY)f$kxe7Ep*wm?vpy8qU=_XYx6@NwJT)}U16SBu(qyKYO6U29bUT4CXv
zN`a#&#s9Zz1smexu)v|ilUDjz-8woyU-_)&Z#2D?ORLu)iUSRguan2LT;Dvz@Yml4
zw)35RH*&EDJUQE*b-TZv?ZG~*-+S`gyBt`oU9OMuU>y*4v{eOD!rEd82#jYZ+_3d_
zyKIN=M*qhC(y&`RTLw_FaP5D&QJsalwQB=&-rBY>!^eq)y>_LebWhvtT4?=06H+3y
diff --git a/meson.build b/meson.build
index cdae85e..1cedc82 100644
--- a/meson.build
+++ b/meson.build
@@ -19,17 +19,6 @@ build_options_config.set_quoted('GITGUI_LIBDIR', get_option('prefix') / get_opti
build_options_config.set_quoted('SHELL_PATH', fs.as_posix(shell.full_path()))
build_options_config.set_quoted('TCLTK_PATH', fs.as_posix(wish.full_path()))
build_options_config.set_quoted('TCL_PATH', fs.as_posix(tclsh.full_path()))
-if target_machine.system() == 'darwin'
- tkexecutables = [
- '/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
- '/System/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
- '/System/Library/Frameworks/Tk.framework/Resources/Wish Shell.app/Contents/MacOS/Wish Shell',
- ]
- tkexecutable = find_program(tkexecutables)
- build_options_config.set_quoted('TKEXECUTABLE', tkexecutable.full_path())
-else
- build_options_config.set('TKEXECUTABLE', '')
-endif
build_options = configure_file(
input: 'GIT-GUI-BUILD-OPTIONS.in',
@@ -70,52 +59,6 @@ if target_machine.system() == 'windows'
install: true,
install_dir: get_option('libexecdir') / 'git-core',
)
-elif target_machine.system() == 'darwin'
- gitgui_main = 'git-gui.tcl'
- gitgui_main_install_dir = get_option('datadir') / 'git-gui/lib'
-
- custom_target(
- output: 'git-gui',
- command: [
- shell,
- meson.current_source_dir() / 'generate-macos-wrapper.sh',
- '@OUTPUT@',
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
- meson.current_build_dir() / 'GIT-VERSION-FILE',
- ],
- depends: [
- version_file,
- ],
- depend_files: [
- build_options,
- ],
- install: true,
- install_dir: get_option('libexecdir') / 'git-core',
- )
-
- custom_target(
- output: 'Git Gui.app',
- command: [
- shell,
- meson.current_source_dir() / 'generate-macos-app.sh',
- meson.current_source_dir(),
- meson.current_build_dir() / 'Git Gui.app',
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
- meson.current_build_dir() / 'GIT-VERSION-FILE',
- ],
- depends: [
- version_file,
- ],
- depend_files: [
- build_options,
- 'macosx/AppMain.tcl',
- 'macosx/Info.plist',
- 'macosx/git-gui.icns',
- ],
- build_by_default: true,
- install: true,
- install_dir: get_option('datadir') / 'git-gui/lib',
- )
endif
custom_target(
--
2.50.1.475.g795bb014d8
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
` (2 preceding siblings ...)
2025-07-30 16:40 ` [PATCH 3/5] git-gui: retire Git Gui.app Carlo Marcelo Arenas Belón
@ 2025-07-30 16:40 ` Carlo Marcelo Arenas Belón
2025-07-30 19:02 ` Johannes Sixt
2025-07-30 16:40 ` [PATCH 5/5] git-gui: ensure own version of git-gui--askpass is used Carlo Marcelo Arenas Belón
` (4 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-30 16:40 UTC (permalink / raw)
To: git
Cc: Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt, Carlo Marcelo Arenas Belón
Since its introduction in 8c76212 (git-gui: Add a simple implementation
of SSH_ASKPASS., 2008-10-15), git-gui--askpass has been calling whatever
wish interpreter is in the path, unlike git-gui.
Correct that by turning it into a script that would be processed at build
time.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
.gitignore | 1 +
Makefile | 9 ++++++---
generate-script.sh | 22 ++++++++++++++++++++++
git-gui--askpass => git-gui--askpass.sh | 0
meson.build | 22 ++++++++++++++--------
5 files changed, 43 insertions(+), 11 deletions(-)
create mode 100755 generate-script.sh
rename git-gui--askpass => git-gui--askpass.sh (100%)
diff --git a/.gitignore b/.gitignore
index ba845f3..5130b4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@ git-gui.tcl
GIT-GUI-BUILD-OPTIONS
GIT-VERSION-FILE
git-gui
+git-gui--askpass
lib/tclIndex
diff --git a/Makefile b/Makefile
index 2ac5f44..b2d7ffb 100644
--- a/Makefile
+++ b/Makefile
@@ -173,10 +173,13 @@ GIT-GUI-BUILD-OPTIONS: FORCE
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
+git-gui--askpass: git-gui--askpass.sh GIT-GUI-BUILD-OPTIONS generate-script.sh
+ $(QUIET_GEN)$(SHELL_PATH) generate-script.sh $@ $< GIT-GUI-BUILD-OPTIONS
+
ifdef GITGUI_WINDOWS_WRAPPER
-all:: git-gui
+all:: git-gui git-gui--askpass
endif
-all:: $(GITGUI_MAIN) lib/tclIndex $(ALL_MSGFILES)
+all:: $(GITGUI_MAIN) git-gui--askpass lib/tclIndex $(ALL_MSGFILES)
install: all
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
@@ -215,7 +218,7 @@ dist-version: GIT-VERSION-FILE
@sed 's|^GITGUI_VERSION=||' <GIT-VERSION-FILE >$(TARDIR)/version
clean::
- $(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
+ $(RM_RF) $(GITGUI_MAIN) git-gui--askpass lib/tclIndex po/*.msg $(PO_TEMPLATE)
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
ifdef GITGUI_WINDOWS_WRAPPER
$(RM_RF) git-gui
diff --git a/generate-script.sh b/generate-script.sh
new file mode 100755
index 0000000..0dd2da9
--- /dev/null
+++ b/generate-script.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if test $# -ne 3
+then
+ echo >&2 "USAGE: $0 <OUTPUT> <INPUT> <GIT-GUI-BUILD-OPTIONS>"
+ exit 1
+fi
+
+OUTPUT="$1"
+INPUT="$2"
+BUILD_OPTIONS="$3"
+
+. "$BUILD_OPTIONS"
+
+sed \
+ -e "1s|#!.*/sh|#!$SHELL_PATH|" \
+ -e "1,3s|^exec wish|exec '$TCLTK_PATH'|" \
+ "$INPUT" >"$OUTPUT"
+
+chmod a+x "$OUTPUT"
diff --git a/git-gui--askpass b/git-gui--askpass.sh
similarity index 100%
rename from git-gui--askpass
rename to git-gui--askpass.sh
diff --git a/meson.build b/meson.build
index 1cedc82..320ba09 100644
--- a/meson.build
+++ b/meson.build
@@ -38,14 +38,6 @@ version_file = custom_target(
build_always_stale: true,
)
-configure_file(
- input: 'git-gui--askpass',
- output: 'git-gui--askpass',
- copy: true,
- install: true,
- install_dir: get_option('libexecdir') / 'git-core',
-)
-
gitgui_main = 'git-gui'
gitgui_main_install_dir = get_option('libexecdir') / 'git-core'
@@ -61,6 +53,20 @@ if target_machine.system() == 'windows'
)
endif
+custom_target(
+ output: 'git-gui--askpass',
+ input: 'git-gui--askpass.sh',
+ command: [
+ shell,
+ meson.current_source_dir() / 'generate-script.sh',
+ '@OUTPUT@',
+ '@INPUT@',
+ meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
+ ],
+ install: true,
+ install_dir: get_option('libexecdir') / 'git-core',
+)
+
custom_target(
input: 'git-gui.sh',
output: gitgui_main,
--
2.50.1.475.g795bb014d8
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass
2025-07-30 16:40 ` [PATCH 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass Carlo Marcelo Arenas Belón
@ 2025-07-30 19:02 ` Johannes Sixt
2025-07-31 10:42 ` Patrick Steinhardt
0 siblings, 1 reply; 25+ messages in thread
From: Johannes Sixt @ 2025-07-30 19:02 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belón
Cc: Mark Levedahl, Johannes Schindelin, Patrick Steinhardt, git
Am 30.07.25 um 18:40 schrieb Carlo Marcelo Arenas Belón:
> Since its introduction in 8c76212 (git-gui: Add a simple implementation
> of SSH_ASKPASS., 2008-10-15), git-gui--askpass has been calling whatever
> wish interpreter is in the path, unlike git-gui.
>
> Correct that by turning it into a script that would be processed at build
> time.
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
> .gitignore | 1 +
> Makefile | 9 ++++++---
> generate-script.sh | 22 ++++++++++++++++++++++
> git-gui--askpass => git-gui--askpass.sh | 0
> meson.build | 22 ++++++++++++++--------
> 5 files changed, 43 insertions(+), 11 deletions(-)
> create mode 100755 generate-script.sh
> rename git-gui--askpass => git-gui--askpass.sh (100%)
>
> diff --git a/.gitignore b/.gitignore
> index ba845f3..5130b4f 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -4,4 +4,5 @@ git-gui.tcl
> GIT-GUI-BUILD-OPTIONS
> GIT-VERSION-FILE
> git-gui
> +git-gui--askpass
> lib/tclIndex
> diff --git a/Makefile b/Makefile
> index 2ac5f44..b2d7ffb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -173,10 +173,13 @@ GIT-GUI-BUILD-OPTIONS: FORCE
> @if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
> @if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
>
> +git-gui--askpass: git-gui--askpass.sh GIT-GUI-BUILD-OPTIONS generate-script.sh
> + $(QUIET_GEN)$(SHELL_PATH) generate-script.sh $@ $< GIT-GUI-BUILD-OPTIONS
> +
> ifdef GITGUI_WINDOWS_WRAPPER
> -all:: git-gui
> +all:: git-gui git-gui--askpass
> endif
> -all:: $(GITGUI_MAIN) lib/tclIndex $(ALL_MSGFILES)
> +all:: $(GITGUI_MAIN) git-gui--askpass lib/tclIndex $(ALL_MSGFILES)
I'm not a Makefile expert concerning double-colon targets. Therefore, I
wonder why do we need git-gui--ask-pass twice on Windows.
>
> install: all
> $(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
> @@ -215,7 +218,7 @@ dist-version: GIT-VERSION-FILE
> @sed 's|^GITGUI_VERSION=||' <GIT-VERSION-FILE >$(TARDIR)/version
>
> clean::
> - $(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
> + $(RM_RF) $(GITGUI_MAIN) git-gui--askpass lib/tclIndex po/*.msg $(PO_TEMPLATE)
> $(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
> ifdef GITGUI_WINDOWS_WRAPPER
> $(RM_RF) git-gui
Some dependency must be missing here, since my build fails with
git-gui@cb/no-tcl86-on-macos:1015> make
GITGUI_VERSION=0.21.0.221.g8045a
GEN git-gui
GEN git-gui--askpass
generate-script.sh: line 15: .: GIT-GUI-BUILD-OPTIONS: file not found
make: *** [Makefile:177: git-gui--askpass] Error 1
> diff --git a/generate-script.sh b/generate-script.sh
> new file mode 100755
> index 0000000..0dd2da9
> --- /dev/null
> +++ b/generate-script.sh
> @@ -0,0 +1,22 @@
> +#!/bin/sh
> +
> +set -e
> +
> +if test $# -ne 3
> +then
> + echo >&2 "USAGE: $0 <OUTPUT> <INPUT> <GIT-GUI-BUILD-OPTIONS>"
> + exit 1
> +fi
> +
> +OUTPUT="$1"
> +INPUT="$2"
> +BUILD_OPTIONS="$3"
> +
> +. "$BUILD_OPTIONS"
> +
> +sed \
> + -e "1s|#!.*/sh|#!$SHELL_PATH|" \
> + -e "1,3s|^exec wish|exec '$TCLTK_PATH'|" \
> + "$INPUT" >"$OUTPUT"
> +
> +chmod a+x "$OUTPUT"
> diff --git a/git-gui--askpass b/git-gui--askpass.sh
> similarity index 100%
> rename from git-gui--askpass
> rename to git-gui--askpass.sh
> diff --git a/meson.build b/meson.build
> index 1cedc82..320ba09 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -38,14 +38,6 @@ version_file = custom_target(
> build_always_stale: true,
> )
>
> -configure_file(
> - input: 'git-gui--askpass',
> - output: 'git-gui--askpass',
> - copy: true,
> - install: true,
> - install_dir: get_option('libexecdir') / 'git-core',
> -)
> -
> gitgui_main = 'git-gui'
> gitgui_main_install_dir = get_option('libexecdir') / 'git-core'
>
> @@ -61,6 +53,20 @@ if target_machine.system() == 'windows'
> )
> endif
>
> +custom_target(
> + output: 'git-gui--askpass',
> + input: 'git-gui--askpass.sh',
> + command: [
> + shell,
> + meson.current_source_dir() / 'generate-script.sh',
> + '@OUTPUT@',
> + '@INPUT@',
> + meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
> + ],
> + install: true,
> + install_dir: get_option('libexecdir') / 'git-core',
> +)
> +
> custom_target(
> input: 'git-gui.sh',
> output: gitgui_main,
I can't comment on the meson part at all.
-- Hannes
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass
2025-07-30 19:02 ` Johannes Sixt
@ 2025-07-31 10:42 ` Patrick Steinhardt
0 siblings, 0 replies; 25+ messages in thread
From: Patrick Steinhardt @ 2025-07-31 10:42 UTC (permalink / raw)
To: Johannes Sixt
Cc: Carlo Marcelo Arenas Belón, Mark Levedahl,
Johannes Schindelin, git
On Wed, Jul 30, 2025 at 09:02:50PM +0200, Johannes Sixt wrote:
> Am 30.07.25 um 18:40 schrieb Carlo Marcelo Arenas Belón:
> > diff --git a/meson.build b/meson.build
> > index 1cedc82..320ba09 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -38,14 +38,6 @@ version_file = custom_target(
> > build_always_stale: true,
> > )
> >
> > -configure_file(
> > - input: 'git-gui--askpass',
> > - output: 'git-gui--askpass',
> > - copy: true,
> > - install: true,
> > - install_dir: get_option('libexecdir') / 'git-core',
> > -)
> > -
> > gitgui_main = 'git-gui'
> > gitgui_main_install_dir = get_option('libexecdir') / 'git-core'
> >
> > @@ -61,6 +53,20 @@ if target_machine.system() == 'windows'
> > )
> > endif
> >
> > +custom_target(
> > + output: 'git-gui--askpass',
> > + input: 'git-gui--askpass.sh',
> > + command: [
> > + shell,
> > + meson.current_source_dir() / 'generate-script.sh',
> > + '@OUTPUT@',
> > + '@INPUT@',
> > + meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
> > + ],
> > + install: true,
> > + install_dir: get_option('libexecdir') / 'git-core',
> > +)
> > +
> > custom_target(
> > input: 'git-gui.sh',
> > output: gitgui_main,
>
> I can't comment on the meson part at all.
The Meson part looks reasonable to me.
Patrick
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH 5/5] git-gui: ensure own version of git-gui--askpass is used
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
` (3 preceding siblings ...)
2025-07-30 16:40 ` [PATCH 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass Carlo Marcelo Arenas Belón
@ 2025-07-30 16:40 ` Carlo Marcelo Arenas Belón
2025-07-30 19:04 ` Johannes Sixt
2025-07-30 19:09 ` [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Johannes Sixt
` (3 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-30 16:40 UTC (permalink / raw)
To: git
Cc: Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt, Carlo Marcelo Arenas Belón
Propagate the `git --exec-path` that is defined at build time
and use it when defining which askpass helper to use by default.
This is specially useful in macOS where a broken version of that
helper is provided by the system git.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
generate-git-gui.sh | 1 +
git-gui.sh | 10 +++++++++-
lib/about.tcl | 4 ++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/generate-git-gui.sh b/generate-git-gui.sh
index 39dfafd..f804686 100755
--- a/generate-git-gui.sh
+++ b/generate-git-gui.sh
@@ -22,6 +22,7 @@ sed \
-e "s|@@SHELL_PATH@@|$SHELL_PATH|" \
-e "1,30s|^ exec wish | exec '$TCLTK_PATH' |" \
-e "s|@@GITGUI_VERSION@@|$GITGUI_VERSION|g" \
+ -e "s|@@GITGUI_GITEXECDIR@@|$GITGUI_GITEXECDIR|" \
-e "s|@@GITGUI_RELATIVE@@|$GITGUI_RELATIVE|" \
-e "${GITGUI_RELATIVE}s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
"$INPUT" >"$OUTPUT"+
diff --git a/git-gui.sh b/git-gui.sh
index 8bb121d..9e6c152 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -364,6 +364,7 @@ set _isbare {}
set _githtmldir {}
set _reponame {}
set _shellpath {@@SHELL_PATH@@}
+set _gitexecdir {@@GITGUI_GITEXECDIR@@}
set _trace [lsearch -exact $argv --trace]
if {$_trace >= 0} {
@@ -387,6 +388,13 @@ if {[string match @@* $_shellpath]} {
}
}
+if {[string match @@* $_gitexecdir]} {
+ if {[catch {set _gitexecdir [exec git --exec-path]} err]} {
+ error "Git not installed?\n\n$err"
+ }
+ set _gitexecdir [file normalize $_gitexecdir]
+}
+
if {[is_Windows]} {
set _shellpath [safe_exec [list cygpath -m $_shellpath]]
}
@@ -1114,7 +1122,7 @@ citool {
# Suggest our implementation of askpass, if none is set
if {![info exists env(SSH_ASKPASS)]} {
- set env(SSH_ASKPASS) [file join [git --exec-path] git-gui--askpass]
+ set env(SSH_ASKPASS) [file join $_gitexecdir git-gui--askpass]
}
######################################################################
diff --git a/lib/about.tcl b/lib/about.tcl
index 122ebfb..d68e23b 100644
--- a/lib/about.tcl
+++ b/lib/about.tcl
@@ -2,7 +2,7 @@
# Copyright (C) 2006, 2007 Shawn Pearce
proc do_about {} {
- global appvers copyright oguilib
+ global appvers copyright oguilib _gitexecdir
global tcl_patchLevel tk_patchLevel
global ui_comm_spell
@@ -44,7 +44,7 @@ proc do_about {} {
set d {}
append d "git wrapper: $::_git\n"
- append d "git exec dir: [git --exec-path]\n"
+ append d "git exec dir: $_gitexecdir\n"
append d "git-gui lib: $oguilib"
paddedlabel $w.vers -text $v
--
2.50.1.475.g795bb014d8
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH 5/5] git-gui: ensure own version of git-gui--askpass is used
2025-07-30 16:40 ` [PATCH 5/5] git-gui: ensure own version of git-gui--askpass is used Carlo Marcelo Arenas Belón
@ 2025-07-30 19:04 ` Johannes Sixt
2025-07-30 21:19 ` Mark Levedahl
0 siblings, 1 reply; 25+ messages in thread
From: Johannes Sixt @ 2025-07-30 19:04 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belón
Cc: Mark Levedahl, Johannes Schindelin, Patrick Steinhardt, git
Am 30.07.25 um 18:40 schrieb Carlo Marcelo Arenas Belón:
> Propagate the `git --exec-path` that is defined at build time
> and use it when defining which askpass helper to use by default.
>
> This is specially useful in macOS where a broken version of that
> helper is provided by the system git.
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
This patch breaks Git GUI on builds with RUNTIME_PREFIX, I think,
because it hard-codes the path to some exec-path that might not exist
during runtime.
> generate-git-gui.sh | 1 +
> git-gui.sh | 10 +++++++++-
> lib/about.tcl | 4 ++--
> 3 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/generate-git-gui.sh b/generate-git-gui.sh
> index 39dfafd..f804686 100755
> --- a/generate-git-gui.sh
> +++ b/generate-git-gui.sh
> @@ -22,6 +22,7 @@ sed \
> -e "s|@@SHELL_PATH@@|$SHELL_PATH|" \
> -e "1,30s|^ exec wish | exec '$TCLTK_PATH' |" \
> -e "s|@@GITGUI_VERSION@@|$GITGUI_VERSION|g" \
> + -e "s|@@GITGUI_GITEXECDIR@@|$GITGUI_GITEXECDIR|" \
> -e "s|@@GITGUI_RELATIVE@@|$GITGUI_RELATIVE|" \
> -e "${GITGUI_RELATIVE}s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
> "$INPUT" >"$OUTPUT"+
> diff --git a/git-gui.sh b/git-gui.sh
> index 8bb121d..9e6c152 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -364,6 +364,7 @@ set _isbare {}
> set _githtmldir {}
> set _reponame {}
> set _shellpath {@@SHELL_PATH@@}
> +set _gitexecdir {@@GITGUI_GITEXECDIR@@}
>
> set _trace [lsearch -exact $argv --trace]
> if {$_trace >= 0} {
> @@ -387,6 +388,13 @@ if {[string match @@* $_shellpath]} {
> }
> }
>
> +if {[string match @@* $_gitexecdir]} {
> + if {[catch {set _gitexecdir [exec git --exec-path]} err]} {
We can't use [git --exec-path] here, because proc git is not defined,
yet. Good.
> + error "Git not installed?\n\n$err"
We barely use 'error'. This is for developers, I would think, so it may
be ok-ish. An alternative would be 'puts stderr ...' that we use elsewhere.
We must exit here, but 'error' doesn't do it for us. Insert 'exit 1'.
> + }
> + set _gitexecdir [file normalize $_gitexecdir]
> +}
> +
> if {[is_Windows]} {
> set _shellpath [safe_exec [list cygpath -m $_shellpath]]
> }
> @@ -1114,7 +1122,7 @@ citool {
>
> # Suggest our implementation of askpass, if none is set
> if {![info exists env(SSH_ASKPASS)]} {
> - set env(SSH_ASKPASS) [file join [git --exec-path] git-gui--askpass]
> + set env(SSH_ASKPASS) [file join $_gitexecdir git-gui--askpass]
> }
>
> ######################################################################
> diff --git a/lib/about.tcl b/lib/about.tcl
> index 122ebfb..d68e23b 100644
> --- a/lib/about.tcl
> +++ b/lib/about.tcl
> @@ -2,7 +2,7 @@
> # Copyright (C) 2006, 2007 Shawn Pearce
>
> proc do_about {} {
> - global appvers copyright oguilib
> + global appvers copyright oguilib _gitexecdir
> global tcl_patchLevel tk_patchLevel
> global ui_comm_spell
>
> @@ -44,7 +44,7 @@ proc do_about {} {
>
> set d {}
> append d "git wrapper: $::_git\n"
> - append d "git exec dir: [git --exec-path]\n"
> + append d "git exec dir: $_gitexecdir\n"
Nice touch to change this case as well!
> append d "git-gui lib: $oguilib"
>
> paddedlabel $w.vers -text $v
-- Hannes
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 5/5] git-gui: ensure own version of git-gui--askpass is used
2025-07-30 19:04 ` Johannes Sixt
@ 2025-07-30 21:19 ` Mark Levedahl
0 siblings, 0 replies; 25+ messages in thread
From: Mark Levedahl @ 2025-07-30 21:19 UTC (permalink / raw)
To: Johannes Sixt, Carlo Marcelo Arenas Belón
Cc: Johannes Schindelin, Patrick Steinhardt, git
On 7/30/25 3:04 PM, Johannes Sixt wrote:
> Am 30.07.25 um 18:40 schrieb Carlo Marcelo Arenas Belón:
>> Propagate the `git --exec-path` that is defined at build time
>> and use it when defining which askpass helper to use by default.
>>
>> This is specially useful in macOS where a broken version of that
>> helper is provided by the system git.
>>
>> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
>> ---
>
The expectation is that git-gui--askpass is colocated with git-gui, and not with git. This
directory is found at runtime as
[file dirname [file normalize $::argv0]]]
It seems to me we could just put this into git-gui.sh instead of [git --exec-path], and
the patch is much simpler.
Mark
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
` (4 preceding siblings ...)
2025-07-30 16:40 ` [PATCH 5/5] git-gui: ensure own version of git-gui--askpass is used Carlo Marcelo Arenas Belón
@ 2025-07-30 19:09 ` Johannes Sixt
2025-07-30 23:54 ` Carlo Arenas
2025-07-30 20:06 ` Junio C Hamano
` (2 subsequent siblings)
8 siblings, 1 reply; 25+ messages in thread
From: Johannes Sixt @ 2025-07-30 19:09 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belón
Cc: Mark Levedahl, Johannes Schindelin, Patrick Steinhardt, git
Am 30.07.25 um 18:40 schrieb Carlo Marcelo Arenas Belón:
> This series, add improvements to allow running `git-gui` in macOS, which is
> stuck in an ancient version of Tcl/TK that is no longer supported by git.
>
> Patches 1 and 2 are minor fixes that could also apply to maint, but the main
> change is in Patch 3, which removes the long obsoleted "Git Gui" app that was
> tied to the system provided Tcl/TK framework and that has been broken for a
> while.
This sounds like the lifted requirement of Tcl 8.6 isn't the cause why
this part is broken. But the commit message of patch 3 says it is. Which
one is it?
>
> Patches 4 and 5 are needed to avoid the system framework and facilitate using
> a third party provided package of Tcl/TK 8.6 instead, but the last patch also
> protects against a conflict with the Xcode provided git that for some reason
> includes a copy pf `git-gui--askpass` even if `git-gui` is missing.
Patch 5, I fear, needs a different approach as it breaks RUNTIME_PREFIX
builds. I say that after having looked at the patch; I haven't test it.
Any help would be appreciated on the Meson parts and whether the updated
git-gui--askpass build still works. I don't use either of them.
>
> Carlo Marcelo Arenas Belón (5):
> git-gui: remove uname_O in Makefile
> git-gui: fix dependency of GITGUI_MAIN on generator
> git-gui: retire Git Gui.app
> git-gui: honor TCLTK_PATH in git-gui--askpass
> git-gui: ensure own version of git-gui--askpass is used
>
> .gitignore | 2 +-
> GIT-GUI-BUILD-OPTIONS.in | 1 -
> Makefile | 63 +++----------------
> generate-git-gui.sh | 1 +
> generate-macos-app.sh | 30 ---------
> generate-macos-wrapper.sh | 35 -----------
> generate-script.sh | 22 +++++++
> git-gui--askpass => git-gui--askpass.sh | 0
> git-gui.sh | 10 ++-
> lib/about.tcl | 4 +-
> macosx/AppMain.tcl | 29 ---------
> macosx/Info.plist | 30 ---------
> macosx/git-gui.icns | Bin 28866 -> 0 bytes
> meson.build | 79 +++++-------------------
> 14 files changed, 56 insertions(+), 250 deletions(-)
> delete mode 100755 generate-macos-app.sh
> delete mode 100755 generate-macos-wrapper.sh
> create mode 100755 generate-script.sh
> rename git-gui--askpass => git-gui--askpass.sh (100%)
> delete mode 100644 macosx/AppMain.tcl
> delete mode 100644 macosx/Info.plist
> delete mode 100644 macosx/git-gui.icns
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
-- Hannes
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS
2025-07-30 19:09 ` [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Johannes Sixt
@ 2025-07-30 23:54 ` Carlo Arenas
2025-07-31 10:46 ` Patrick Steinhardt
0 siblings, 1 reply; 25+ messages in thread
From: Carlo Arenas @ 2025-07-30 23:54 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Mark Levedahl, Johannes Schindelin, Patrick Steinhardt, git
On Wed, Jul 30, 2025 at 12:09 PM Johannes Sixt <j6t@kdbg.org> wrote:
>
> Am 30.07.25 um 18:40 schrieb Carlo Marcelo Arenas Belón:
> >
> > Patches 1 and 2 are minor fixes that could also apply to maint, but the main
> > change is in Patch 3, which removes the long obsoleted "Git Gui" app that was
> > tied to the system provided Tcl/TK framework and that has been broken for a
> > while.
>
> This sounds like the lifted requirement of Tcl 8.6 isn't the cause why
> this part is broken. But the commit message of patch 3 says it is. Which
> one is it?
It has been broken multiple times. Since macOS 11 (released in 2020) using the
system provided Framework had caused problems, some were worked around by
use_ttk=0, but it was more reliable to use a third party Tcl/Tk.
For example, Homebrew tricks the Makefile to fail to detect the system
Tcl/Tk and
to use their own version of that dependency.
Something in the recent meson related changes broke the generator for the App
and it wouldn't even start, I didn't propose a fix, since that is
likely also affecting
maint and nobody complained, which is why I was proposing to remove the App
instead.
The last changes that remove use_ttk and force a version that is no
longer provided
by the hard coded dependency of the App are just the last nail on its coffin.
> > Patches 4 and 5 are needed to avoid the system framework and facilitate using
> > a third party provided package of Tcl/TK 8.6 instead, but the last patch also
> > protects against a conflict with the Xcode provided git that for some reason
> > includes a copy of `git-gui--askpass` even if `git-gui` is missing.
>
> Patch 5, I fear, needs a different approach as it breaks RUNTIME_PREFIX
> builds. I say that after having looked at the patch; I haven't test it.
I tried not to break RUNTIME_PREFIX by only using the build provided execpath
to locate the askpass helper, but the suggestion by Mark seems like a
better approach.
> Any help would be appreciated on the Meson parts
The Meson build works when tested outside the git repository, but since the main
meson.build doesn't yet use that to build/install git-gui there is no
way to do a full
test.
Eitherway, it can't make things worse.
> and whether the updated
> git-gui--askpass build still works. I don't use either of them.
to trigger the helper you might need OpenSSH >= 8.4 and having the following
variable in the environment before calling git-gui:
SSH_ASKPASS_REQUIRE=force
note that G4W provides its own native `SSH_ASKPASS=git-askpass.exe`so that
must be unset first.
Carlo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS
2025-07-30 23:54 ` Carlo Arenas
@ 2025-07-31 10:46 ` Patrick Steinhardt
0 siblings, 0 replies; 25+ messages in thread
From: Patrick Steinhardt @ 2025-07-31 10:46 UTC (permalink / raw)
To: Carlo Arenas; +Cc: Johannes Sixt, Mark Levedahl, Johannes Schindelin, git
On Wed, Jul 30, 2025 at 04:54:12PM -0700, Carlo Arenas wrote:
> On Wed, Jul 30, 2025 at 12:09 PM Johannes Sixt <j6t@kdbg.org> wrote:
> > Any help would be appreciated on the Meson parts
>
> The Meson build works when tested outside the git repository, but since the main
> meson.build doesn't yet use that to build/install git-gui there is no
> way to do a full
> test.
>
> Eitherway, it can't make things worse.
The Meson part looks reasonable to me.
In any case yes, I haven't yet wired up gitk/git-gui in Git itself. It
is trivial to do in theory, and I've already got the patch series
sitting locally for quite a while. But there's one catch: we'll have to
add those as subprojects, and Meson looks for subprojects in the
"subprojects/" directory. Which means that we'd have to move around both
gitk and git-gui directories to be located in "subprojects/". We can
pick the name of that directory, but it must not be the top-level
directory of the project.
I shied away from sending such a patch series for now because I wasn't
quite sure how it'll be received. I don't think it's too bad, but it
certainly is a bit akward.
Patrick
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
` (5 preceding siblings ...)
2025-07-30 19:09 ` [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Johannes Sixt
@ 2025-07-30 20:06 ` Junio C Hamano
2025-07-30 20:06 ` Junio C Hamano
2025-07-31 8:06 ` [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk " Carlo Marcelo Arenas Belón
8 siblings, 0 replies; 25+ messages in thread
From: Junio C Hamano @ 2025-07-30 20:06 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belón
Cc: git, Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
> This series, add improvements to allow running `git-gui` in macOS, which is
> stuck in an ancient version of Tcl/TK that is no longer supported by git.
A naïve question.
Just like Git is a third-party software from macOS's point of view,
wouldn't Tcl/Tk be equally a third-party software, or is it more
ingrained to the base operation system offering for some reason?
The reason why I ask this question is because I do not see how it
would make it a lot more hassle having to upgrade the version of
tcl/tk on their macOS machine than having to upgrade the Git to the
version that ships with this change, from an end-user's point of
view.
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
` (6 preceding siblings ...)
2025-07-30 20:06 ` Junio C Hamano
@ 2025-07-30 20:06 ` Junio C Hamano
2025-07-30 20:51 ` Carlo Arenas
2025-07-31 8:06 ` [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk " Carlo Marcelo Arenas Belón
8 siblings, 1 reply; 25+ messages in thread
From: Junio C Hamano @ 2025-07-30 20:06 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belón
Cc: git, Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
> This series, add improvements to allow running `git-gui` in macOS, which is
> stuck in an ancient version of Tcl/TK that is no longer supported by git.
A naïve question.
Just like Git is a third-party software from macOS's point of view,
wouldn't Tcl/Tk be equally a third-party software, or is it more
ingrained to the base operation system offering for some reason?
The reason why I ask this question is because I do not see how it
would make it a lot more hassle having to upgrade the version of
tcl/tk on their macOS machine than having to upgrade the Git to the
version that ships with this change, from an end-user's point of
view.
^ permalink raw reply [flat|nested] 25+ messages in thread* Re: [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS
2025-07-30 20:06 ` Junio C Hamano
@ 2025-07-30 20:51 ` Carlo Arenas
2025-07-31 0:04 ` Junio C Hamano
0 siblings, 1 reply; 25+ messages in thread
From: Carlo Arenas @ 2025-07-30 20:51 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt
On Wed, Jul 30, 2025 at 1:06 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
>
> > This series adds improvements to allow running `git-gui` in macOS, which is
> > stuck in an ancient version of Tcl/TK that is no longer supported by git.
>
> A naïve question.
>
> Just like Git is a third-party software from macOS's point of view,
> wouldn't Tcl/Tk be equally a third-party software, or is it more
> ingrained to the base operation system offering for some reason?
It is more ingrained as Tcl/Tk comes with the OS as a Framework,
although one that hasn't had updates for half a decade, and that
prints a message saying it is deprecated and might be gone in a
future release for several releases, when it works.
git comes as part of the "Development tools" (both the command line
that is independent of Xcode and as part of Xcode) and therefore must
be installed independently.
> The reason why I ask this question is because I do not see how it
> would make it a lot more hassle having to upgrade the version of
> tcl/tk on their macOS machine than having to upgrade the Git to the
> version that ships with this change, from an end-user's point of
> view.
Not sure I understand the question, but "upgrading" is not the problem.
Users can (and had been doing for a while) install a newer version for both
but the Makefile that comes with git-gui tries to find the system provided
Tcl/Tk and use that, which IMHO makes little sense once the git-gui codebase
is no longer compatible with the version provided by that Framework.
Carlo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS
2025-07-30 20:51 ` Carlo Arenas
@ 2025-07-31 0:04 ` Junio C Hamano
0 siblings, 0 replies; 25+ messages in thread
From: Junio C Hamano @ 2025-07-31 0:04 UTC (permalink / raw)
To: Carlo Arenas
Cc: git, Johannes Sixt, Mark Levedahl, Johannes Schindelin,
Patrick Steinhardt
Carlo Arenas <carenas@gmail.com> writes:
> Not sure I understand the question, but "upgrading" is not the problem.
What I read from your description tells us that "upgrading" Tcl/Tk
beyond the version that is given as part of "Framework" *is* a huge
problem for end-users. That was exactly what I was trying to find
out.
Thanks.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk 8.5 in macOS
2025-07-30 16:40 [PATCH 0/5] git-gui: workaround deprecation of Tcl/TK 8.5 in macOS Carlo Marcelo Arenas Belón
` (7 preceding siblings ...)
2025-07-30 20:06 ` Junio C Hamano
@ 2025-07-31 8:06 ` Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 1/5] git-gui: remove uname_O in Makefile Carlo Marcelo Arenas Belón
` (4 more replies)
8 siblings, 5 replies; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-31 8:06 UTC (permalink / raw)
To: git
Cc: j6t, johannes.schindelin, mlevedahl, ps, gitster,
Carlo Marcelo Arenas Belón
This series, adds improvements to allow running `git-gui` in macOS, which is
stuck in an ancient version of Tcl/Tk that is no longer supported by git.
Patches 1 and 2 are minor fixes that could also apply to maint, but the main
change is in Patch 3, which removes the long obsoleted "Git Gui" app that was
tied to the system provided Tcl/Tk framework and that has been broken for a
while.
Patches 4 and 5 are needed to avoid the system framework and facilitate using
a third party provided package of Tcl/Tk 8.6 instead, but the last patch also
protects against a conflict with the Xcode provided git that for some reason
includes a copy of `git-gui--askpass`, even if `git-gui` is missing.
Carlo Marcelo Arenas Belón (5):
git-gui: remove uname_O in Makefile
git-gui: fix dependency of GITGUI_MAIN on generator
git-gui: retire Git Gui.app
git-gui: honor TCLTK_PATH in git-gui--askpass
git-gui: ensure own version of git-gui--askpass is used
.gitignore | 2 +-
GIT-GUI-BUILD-OPTIONS.in | 1 -
Makefile | 61 ++----------------
generate-macos-app.sh | 30 ---------
generate-macos-wrapper.sh | 35 -----------
generate-script.sh | 22 +++++++
git-gui--askpass => git-gui--askpass.sh | 0
git-gui.sh | 4 +-
macosx/AppMain.tcl | 29 ---------
macosx/Info.plist | 30 ---------
macosx/git-gui.icns | Bin 28866 -> 0 bytes
meson.build | 79 +++++-------------------
12 files changed, 46 insertions(+), 247 deletions(-)
delete mode 100755 generate-macos-app.sh
delete mode 100755 generate-macos-wrapper.sh
create mode 100755 generate-script.sh
rename git-gui--askpass => git-gui--askpass.sh (100%)
delete mode 100644 macosx/AppMain.tcl
delete mode 100644 macosx/Info.plist
delete mode 100644 macosx/git-gui.icns
Changes since v1:
* no more silly Makefile issues
* a simpler implementation of patch 5
Range-diff against v1:
1: 423b945 = 1: 423b945 git-gui: remove uname_O in Makefile
2: e7183ab = 2: e7183ab git-gui: fix dependency of GITGUI_MAIN on generator
3: 1054496 = 3: 1054496 git-gui: retire Git Gui.app
4: 7fdd8b5 ! 4: 5d908e3 git-gui: honor TCLTK_PATH in git-gui--askpass
@@ Makefile: GIT-GUI-BUILD-OPTIONS: FORCE
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
+git-gui--askpass: git-gui--askpass.sh GIT-GUI-BUILD-OPTIONS generate-script.sh
-+ $(QUIET_GEN)$(SHELL_PATH) generate-script.sh $@ $< GIT-GUI-BUILD-OPTIONS
++ $(QUIET_GEN)$(SHELL_PATH) generate-script.sh $@ $< ./GIT-GUI-BUILD-OPTIONS
+
ifdef GITGUI_WINDOWS_WRAPPER
--all:: git-gui
-+all:: git-gui git-gui--askpass
+ all:: git-gui
endif
-all:: $(GITGUI_MAIN) lib/tclIndex $(ALL_MSGFILES)
+all:: $(GITGUI_MAIN) git-gui--askpass lib/tclIndex $(ALL_MSGFILES)
5: 1eae516 ! 5: c5ffefc git-gui: ensure own version of git-gui--askpass is used
@@ Metadata
## Commit message ##
git-gui: ensure own version of git-gui--askpass is used
- Propagate the `git --exec-path` that is defined at build time
- and use it when defining which askpass helper to use by default.
+ When finding a location for the askpass helper, git will be asked
+ for its exec path, but if that git is not the same that called
+ git-gui then we might mistakenly point to its helper instead.
+
+ Assume that git-gui and the helper are colocated to derive its
+ path instead.
This is specially useful in macOS where a broken version of that
helper is provided by the system git.
+ Suggested-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
- ## generate-git-gui.sh ##
-@@ generate-git-gui.sh: sed \
- -e "s|@@SHELL_PATH@@|$SHELL_PATH|" \
- -e "1,30s|^ exec wish | exec '$TCLTK_PATH' |" \
- -e "s|@@GITGUI_VERSION@@|$GITGUI_VERSION|g" \
-+ -e "s|@@GITGUI_GITEXECDIR@@|$GITGUI_GITEXECDIR|" \
- -e "s|@@GITGUI_RELATIVE@@|$GITGUI_RELATIVE|" \
- -e "${GITGUI_RELATIVE}s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
- "$INPUT" >"$OUTPUT"+
-
## git-gui.sh ##
-@@ git-gui.sh: set _isbare {}
- set _githtmldir {}
- set _reponame {}
- set _shellpath {@@SHELL_PATH@@}
-+set _gitexecdir {@@GITGUI_GITEXECDIR@@}
-
- set _trace [lsearch -exact $argv --trace]
- if {$_trace >= 0} {
-@@ git-gui.sh: if {[string match @@* $_shellpath]} {
- }
- }
-
-+if {[string match @@* $_gitexecdir]} {
-+ if {[catch {set _gitexecdir [exec git --exec-path]} err]} {
-+ error "Git not installed?\n\n$err"
-+ }
-+ set _gitexecdir [file normalize $_gitexecdir]
-+}
-+
- if {[is_Windows]} {
- set _shellpath [safe_exec [list cygpath -m $_shellpath]]
- }
@@ git-gui.sh: citool {
# Suggest our implementation of askpass, if none is set
if {![info exists env(SSH_ASKPASS)]} {
- set env(SSH_ASKPASS) [file join [git --exec-path] git-gui--askpass]
-+ set env(SSH_ASKPASS) [file join $_gitexecdir git-gui--askpass]
++ set env(SSH_ASKPASS) \
++ [file join [file dirname [file normalize $::argv0]] \
++ git-gui--askpass]
}
######################################################################
-
- ## lib/about.tcl ##
-@@
- # Copyright (C) 2006, 2007 Shawn Pearce
-
- proc do_about {} {
-- global appvers copyright oguilib
-+ global appvers copyright oguilib _gitexecdir
- global tcl_patchLevel tk_patchLevel
- global ui_comm_spell
-
-@@ lib/about.tcl: proc do_about {} {
-
- set d {}
- append d "git wrapper: $::_git\n"
-- append d "git exec dir: [git --exec-path]\n"
-+ append d "git exec dir: $_gitexecdir\n"
- append d "git-gui lib: $oguilib"
-
- paddedlabel $w.vers -text $v
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
--
2.50.1.475.ge15fa7359c
^ permalink raw reply [flat|nested] 25+ messages in thread* [PATCH v2 1/5] git-gui: remove uname_O in Makefile
2025-07-31 8:06 ` [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk " Carlo Marcelo Arenas Belón
@ 2025-07-31 8:06 ` Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 2/5] git-gui: fix dependency of GITGUI_MAIN on generator Carlo Marcelo Arenas Belón
` (3 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-31 8:06 UTC (permalink / raw)
To: git
Cc: j6t, johannes.schindelin, mlevedahl, ps, gitster,
Carlo Marcelo Arenas Belón
Last used in ae49066 (git gui Makefile - remove Cygwin modifications,
2023-06-26), and unused since.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 315888f..a87dc06 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,6 @@ GIT-VERSION-FILE: FORCE
@$(SHELL_PATH) ./GIT-VERSION-GEN . $@
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
SCRIPT_SH = git-gui.sh
--
2.50.1.475.ge15fa7359c
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v2 2/5] git-gui: fix dependency of GITGUI_MAIN on generator
2025-07-31 8:06 ` [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk " Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 1/5] git-gui: remove uname_O in Makefile Carlo Marcelo Arenas Belón
@ 2025-07-31 8:06 ` Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 3/5] git-gui: retire Git Gui.app Carlo Marcelo Arenas Belón
` (2 subsequent siblings)
4 siblings, 0 replies; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-31 8:06 UTC (permalink / raw)
To: git
Cc: j6t, johannes.schindelin, mlevedahl, ps, gitster,
Carlo Marcelo Arenas Belón
Since 854e883 (git-gui: extract script to generate "git-gui",
2025-03-11), the logic to generate the main script was pulled
out of the Makefile, but adding the resulting generator as a
dependency was missed.
If the logic changes, the main script should be regenerated, so
add it as a dependency.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index a87dc06..179857d 100644
--- a/Makefile
+++ b/Makefile
@@ -168,7 +168,7 @@ git-gui: windows/git-gui.sh
cp $< $@
endif
-$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
+$(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS generate-git-gui.sh
$(QUIET_GEN)$(SHELL_PATH) generate-git-gui.sh "$<" "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
XGETTEXT ?= xgettext
--
2.50.1.475.ge15fa7359c
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v2 3/5] git-gui: retire Git Gui.app
2025-07-31 8:06 ` [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk " Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 1/5] git-gui: remove uname_O in Makefile Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 2/5] git-gui: fix dependency of GITGUI_MAIN on generator Carlo Marcelo Arenas Belón
@ 2025-07-31 8:06 ` Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 5/5] git-gui: ensure own version of git-gui--askpass is used Carlo Marcelo Arenas Belón
4 siblings, 0 replies; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-31 8:06 UTC (permalink / raw)
To: git
Cc: j6t, johannes.schindelin, mlevedahl, ps, gitster,
Carlo Marcelo Arenas Belón
In a recent commit, the minimum version of Tcl/Tk was raised to
8.6, but the "app" relies on the system provided Framework that
is based on 8.5.
Remove it, and let git-gui use a third party version of Wish if
available.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
.gitignore | 1 -
GIT-GUI-BUILD-OPTIONS.in | 1 -
Makefile | 51 ----------------------------------
generate-macos-app.sh | 30 --------------------
generate-macos-wrapper.sh | 35 -----------------------
macosx/AppMain.tcl | 29 -------------------
macosx/Info.plist | 30 --------------------
macosx/git-gui.icns | Bin 28866 -> 0 bytes
meson.build | 57 --------------------------------------
9 files changed, 234 deletions(-)
delete mode 100755 generate-macos-app.sh
delete mode 100755 generate-macos-wrapper.sh
delete mode 100644 macosx/AppMain.tcl
delete mode 100644 macosx/Info.plist
delete mode 100644 macosx/git-gui.icns
diff --git a/.gitignore b/.gitignore
index ff6e0be..ba845f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
.DS_Store
config.mak
-Git Gui.app*
git-gui.tcl
GIT-GUI-BUILD-OPTIONS
GIT-VERSION-FILE
diff --git a/GIT-GUI-BUILD-OPTIONS.in b/GIT-GUI-BUILD-OPTIONS.in
index 5fd885c..3c112af 100644
--- a/GIT-GUI-BUILD-OPTIONS.in
+++ b/GIT-GUI-BUILD-OPTIONS.in
@@ -4,4 +4,3 @@ GITGUI_RELATIVE=@GITGUI_RELATIVE@
SHELL_PATH=@SHELL_PATH@
TCLTK_PATH=@TCLTK_PATH@
TCL_PATH=@TCL_PATH@
-TKEXECUTABLE=@TKEXECUTABLE@
diff --git a/Makefile b/Makefile
index 179857d..2ac5f44 100644
--- a/Makefile
+++ b/Makefile
@@ -52,8 +52,6 @@ INSTALL_R0 = $(INSTALL) -m 644 # space is required here
INSTALL_R1 =
INSTALL_X0 = $(INSTALL) -m 755 # space is required here
INSTALL_X1 =
-INSTALL_A0 = find # space is required here
-INSTALL_A1 = | cpio -pud
INSTALL_L0 = rm -f # space is required here
INSTALL_L1 = && ln # space is required here
INSTALL_L2 =
@@ -78,8 +76,6 @@ ifndef V
INSTALL_R1 = && echo ' ' INSTALL 644 `basename $$src` && $(INSTALL) -m 644 $$src
INSTALL_X0 = src=
INSTALL_X1 = && echo ' ' INSTALL 755 `basename $$src` && $(INSTALL) -m 755 $$src
- INSTALL_A0 = src=
- INSTALL_A1 = && echo ' ' INSTALL ' ' `basename "$$src"` && find "$$src" | cpio -pud
INSTALL_L0 = dst=
INSTALL_L1 = && src=
@@ -100,18 +96,6 @@ else
TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH)))
endif
-ifeq ($(uname_S),Darwin)
- TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app
- ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n)
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish.app
- ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n)
- TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\ Shell.app
- endif
- endif
- TKEXECUTABLE = $(TKFRAMEWORK)/Contents/MacOS/$(shell basename "$(TKFRAMEWORK)" .app)
- TKEXECUTABLE_SQ = $(subst ','\'',$(TKEXECUTABLE))
-endif
-
ifeq ($(findstring $(firstword -$(MAKEFLAGS)),s),s)
QUIET_GEN =
endif
@@ -129,16 +113,10 @@ libdir_SQ = $(subst ','\'',$(gg_libdir))
exedir = $(dir $(gitexecdir))share/git-gui/lib
GITGUI_RELATIVE :=
-GITGUI_MACOSXAPP :=
ifeq ($(exedir),$(gg_libdir))
GITGUI_RELATIVE := 1
endif
-ifeq ($(uname_S),Darwin)
- ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
- GITGUI_MACOSXAPP := YesPlease
- endif
-endif
ifneq (,$(findstring MINGW,$(uname_S)))
ifeq ($(shell expr "$(uname_R)" : '1\.'),2)
NO_MSGFMT=1
@@ -147,20 +125,6 @@ endif
GITGUI_RELATIVE := 1
endif
-ifdef GITGUI_MACOSXAPP
-GITGUI_MAIN := git-gui.tcl
-
-git-gui: generate-macos-wrapper.sh GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-wrapper.sh "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-
-Git\ Gui.app: GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS \
- macosx/Info.plist \
- macosx/git-gui.icns \
- macosx/AppMain.tcl \
- $(TKEXECUTABLE)
- $(QUIET_GEN)$(SHELL_PATH) generate-macos-app.sh . "$@" ./GIT-GUI-BUILD-OPTIONS ./GIT-VERSION-FILE
-endif
-
ifdef GITGUI_WINDOWS_WRAPPER
GITGUI_MAIN := git-gui.tcl
@@ -205,14 +169,10 @@ GIT-GUI-BUILD-OPTIONS: FORCE
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
-e 's|@TCLTK_PATH@|$(TCLTK_PATH_SQ)|' \
-e 's|@TCL_PATH@|$(TCL_PATH_SQ)|' \
- -e 's|@TKEXECUTABLE@|$(TKEXECUTABLE_SQ)|' \
$@.in >$@+
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
-ifdef GITGUI_MACOSXAPP
-all:: git-gui Git\ Gui.app
-endif
ifdef GITGUI_WINDOWS_WRAPPER
all:: git-gui
endif
@@ -228,10 +188,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
endif
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
-ifdef GITGUI_MACOSXAPP
- $(QUIET)$(INSTALL_A0)'Git Gui.app' $(INSTALL_A1) '$(DESTDIR_SQ)$(libdir_SQ)'
- $(QUIET)$(INSTALL_X0)git-gui.tcl $(INSTALL_X1) '$(DESTDIR_SQ)$(libdir_SQ)'
-endif
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
@@ -246,10 +202,6 @@ ifdef GITGUI_WINDOWS_WRAPPER
endif
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(libdir_SQ)'
$(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/tclIndex $(REMOVE_F1)
-ifdef GITGUI_MACOSXAPP
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)/Git Gui.app' $(REMOVE_F1)
- $(QUIET)$(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/git-gui.tcl $(REMOVE_F1)
-endif
$(QUIET)$(foreach p,$(ALL_LIBFILES) $(NONTCL_LIBFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(libdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
$(QUIET)$(CLEAN_DST) '$(DESTDIR_SQ)$(msgsdir_SQ)'
$(QUIET)$(foreach p,$(ALL_MSGFILES), $(REMOVE_F0)'$(DESTDIR_SQ)$(msgsdir_SQ)'/$(notdir $p) $(REMOVE_F1) &&) true
@@ -265,9 +217,6 @@ dist-version: GIT-VERSION-FILE
clean::
$(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
-ifdef GITGUI_MACOSXAPP
- $(RM_RF) 'Git Gui.app'* git-gui
-endif
ifdef GITGUI_WINDOWS_WRAPPER
$(RM_RF) git-gui
endif
diff --git a/generate-macos-app.sh b/generate-macos-app.sh
deleted file mode 100755
index 71b9fa6..0000000
--- a/generate-macos-app.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-set -e
-
-SOURCE_DIR="$1"
-OUTPUT="$2"
-BUILD_OPTIONS="$3"
-VERSION_FILE="$4"
-
-. "$BUILD_OPTIONS"
-. "$VERSION_FILE"
-
-rm -rf "$OUTPUT" "$OUTPUT+"
-
-mkdir -p "$OUTPUT+/Contents/MacOS"
-mkdir -p "$OUTPUT+/Contents/Resources/Scripts"
-
-cp "$TKEXECUTABLE" "$OUTPUT+/Contents/MacOS"
-cp "$SOURCE_DIR/macosx/git-gui.icns" "$OUTPUT+/Contents/Resources"
-sed \
- -e "s/@@GITGUI_VERSION@@/$GITGUI_VERSION/g" \
- -e "s/@@GITGUI_TKEXECUTABLE@@/$(basename "$TKEXECUTABLE")/g" \
- "$SOURCE_DIR/macosx/Info.plist" \
- >"$OUTPUT+/Contents/Info.plist"
-sed \
- -e "s|@@gitexecdir@@|$GITGUI_GITEXECDIR|" \
- -e "s|@@GITGUI_LIBDIR@@|$GITGUI_LIBDIR|" \
- "$SOURCE_DIR/macosx/AppMain.tcl" \
- >"$OUTPUT+/Contents/Resources/Scripts/AppMain.tcl"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/generate-macos-wrapper.sh b/generate-macos-wrapper.sh
deleted file mode 100755
index 0304937..0000000
--- a/generate-macos-wrapper.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if test "$#" -ne 3
-then
- echo >&2 "usage: $0 <OUTPUT> <BUILD_OPTIONS> <VERSION_FILE>"
- exit 1
-fi
-
-OUTPUT="$1"
-BUILD_OPTIONS="$2"
-VERSION_FILE="$3"
-
-. "$BUILD_OPTIONS"
-
-rm -f "$OUTPUT" "$OUTPUT+"
-
-(
- echo "#!$SHELL_PATH"
- cat "$BUILD_OPTIONS" "$VERSION_FILE"
- cat <<-'EOF'
- if test "z$*" = zversion ||
- test "z$*" = z--version
- then
- echo "git-gui version $GITGUI_VERSION"
- else
- libdir="${GIT_GUI_LIB_DIR:-$GITGUI_LIBDIR}"
- exec "$libdir/Git Gui.app/Contents/MacOS/$(basename "$TKEXECUTABLE")" "$0" "$@"
- fi
- EOF
-) >"$OUTPUT+"
-
-chmod +x "$OUTPUT+"
-mv "$OUTPUT+" "$OUTPUT"
diff --git a/macosx/AppMain.tcl b/macosx/AppMain.tcl
deleted file mode 100644
index b6c6dc3..0000000
--- a/macosx/AppMain.tcl
+++ /dev/null
@@ -1,29 +0,0 @@
-set gitexecdir {@@gitexecdir@@}
-if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
- set gitguilib $::env(GIT_GUI_LIB_DIR)
-} else {
- set gitguilib {@@GITGUI_LIBDIR@@}
-}
-
-set env(PATH) "$gitexecdir:$env(PATH)"
-
-if {[string first -psn [lindex $argv 0]] == 0} {
- lset argv 0 [file join $gitexecdir git-gui]
-}
-
-if {[file tail [lindex $argv 0]] eq {gitk}} {
- set argv0 [lindex $argv 0]
- set AppMain_source $argv0
-} else {
- set argv0 [file join $gitexecdir [file tail [lindex $argv 0]]]
- set AppMain_source [file join $gitguilib git-gui.tcl]
- if {[info exists env(PWD)]} {
- cd $env(PWD)
- } elseif {[pwd] eq {/}} {
- cd $env(HOME)
- }
-}
-
-unset gitexecdir gitguilib
-set argv [lrange $argv 1 end]
-source $AppMain_source
diff --git a/macosx/Info.plist b/macosx/Info.plist
deleted file mode 100644
index 1ade121..0000000
--- a/macosx/Info.plist
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>@@GITGUI_TKEXECUTABLE@@</string>
- <key>CFBundleGetInfoString</key>
- <string>Git Gui @@GITGUI_VERSION@@ © 2006-2007 Shawn Pearce, et. al.</string>
- <key>CFBundleIconFile</key>
- <string>git-gui.icns</string>
- <key>CFBundleIdentifier</key>
- <string>cz.or.repo.git-gui</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>Git Gui</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>@@GITGUI_VERSION@@</string>
- <key>CFBundleSignature</key>
- <string>GITg</string>
- <key>CFBundleVersion</key>
- <string>@@GITGUI_VERSION@@</string>
- <key>NSHighResolutionCapable</key>
- <true/>
-</dict>
-</plist>
diff --git a/macosx/git-gui.icns b/macosx/git-gui.icns
deleted file mode 100644
index 77d88a77a7669667335cf6fd5767c8b40f3ce6e7..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 28866
zcmeHP4O~>^nt#p=2y%5T_jlc}63a@{yjiYES8sx8l*`r3bS<N7-Fab<0Yn3@rVPW3
zAdF%<_<<U?F2zb}wPF5D5mD5uS9DEF>S{u2t2L5Yu9oH5|2gx)IfpX?!;ILidHnHy
zJYWCk{W$M=&wHGspO!k4D1E1X+RQ#g^f+hajNLADyWq;{LKteUe_;(SzAIPC^)m-Q
zNW>k@C5<`e$pSIWqwoQvMm-u6GiuaRW(uD^c5Hl1?AWnW^ISUF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ppx7c<pBS<=Q0l+6
za)D1U9+gLY)f$kxe7Ep*wm?vpy8qU=_XYx6@NwJT)}U16SBu(qyKYO6U29bUT4CXv
zN`a#&#s9Zz1smexu)v|ilUDjz-8woyU-_)&Z#2D?ORLu)iUSRguan2LT;Dvz@Yml4
zw)35RH*&EDJUQE*b-TZv?ZG~*-+S`gyBt`oU9OMuU>y*4v{eOD!rEd82#jYZ+_3d_
zyKIN=M*qhC(y&`RTLw_FaP5D&QJsalwQB=&-rBY>!^eq)y>_LebWhvtT4?=06H+3y
diff --git a/meson.build b/meson.build
index cdae85e..1cedc82 100644
--- a/meson.build
+++ b/meson.build
@@ -19,17 +19,6 @@ build_options_config.set_quoted('GITGUI_LIBDIR', get_option('prefix') / get_opti
build_options_config.set_quoted('SHELL_PATH', fs.as_posix(shell.full_path()))
build_options_config.set_quoted('TCLTK_PATH', fs.as_posix(wish.full_path()))
build_options_config.set_quoted('TCL_PATH', fs.as_posix(tclsh.full_path()))
-if target_machine.system() == 'darwin'
- tkexecutables = [
- '/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
- '/System/Library/Frameworks/Tk.framework/Resources/Wish.app/Contents/MacOS/Wish',
- '/System/Library/Frameworks/Tk.framework/Resources/Wish Shell.app/Contents/MacOS/Wish Shell',
- ]
- tkexecutable = find_program(tkexecutables)
- build_options_config.set_quoted('TKEXECUTABLE', tkexecutable.full_path())
-else
- build_options_config.set('TKEXECUTABLE', '')
-endif
build_options = configure_file(
input: 'GIT-GUI-BUILD-OPTIONS.in',
@@ -70,52 +59,6 @@ if target_machine.system() == 'windows'
install: true,
install_dir: get_option('libexecdir') / 'git-core',
)
-elif target_machine.system() == 'darwin'
- gitgui_main = 'git-gui.tcl'
- gitgui_main_install_dir = get_option('datadir') / 'git-gui/lib'
-
- custom_target(
- output: 'git-gui',
- command: [
- shell,
- meson.current_source_dir() / 'generate-macos-wrapper.sh',
- '@OUTPUT@',
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
- meson.current_build_dir() / 'GIT-VERSION-FILE',
- ],
- depends: [
- version_file,
- ],
- depend_files: [
- build_options,
- ],
- install: true,
- install_dir: get_option('libexecdir') / 'git-core',
- )
-
- custom_target(
- output: 'Git Gui.app',
- command: [
- shell,
- meson.current_source_dir() / 'generate-macos-app.sh',
- meson.current_source_dir(),
- meson.current_build_dir() / 'Git Gui.app',
- meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
- meson.current_build_dir() / 'GIT-VERSION-FILE',
- ],
- depends: [
- version_file,
- ],
- depend_files: [
- build_options,
- 'macosx/AppMain.tcl',
- 'macosx/Info.plist',
- 'macosx/git-gui.icns',
- ],
- build_by_default: true,
- install: true,
- install_dir: get_option('datadir') / 'git-gui/lib',
- )
endif
custom_target(
--
2.50.1.475.ge15fa7359c
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v2 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass
2025-07-31 8:06 ` [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk " Carlo Marcelo Arenas Belón
` (2 preceding siblings ...)
2025-07-31 8:06 ` [PATCH v2 3/5] git-gui: retire Git Gui.app Carlo Marcelo Arenas Belón
@ 2025-07-31 8:06 ` Carlo Marcelo Arenas Belón
2025-07-31 8:06 ` [PATCH v2 5/5] git-gui: ensure own version of git-gui--askpass is used Carlo Marcelo Arenas Belón
4 siblings, 0 replies; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-31 8:06 UTC (permalink / raw)
To: git
Cc: j6t, johannes.schindelin, mlevedahl, ps, gitster,
Carlo Marcelo Arenas Belón
Since its introduction in 8c76212 (git-gui: Add a simple implementation
of SSH_ASKPASS., 2008-10-15), git-gui--askpass has been calling whatever
wish interpreter is in the path, unlike git-gui.
Correct that by turning it into a script that would be processed at build
time.
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
.gitignore | 1 +
Makefile | 7 +++++--
generate-script.sh | 22 ++++++++++++++++++++++
git-gui--askpass => git-gui--askpass.sh | 0
meson.build | 22 ++++++++++++++--------
5 files changed, 42 insertions(+), 10 deletions(-)
create mode 100755 generate-script.sh
rename git-gui--askpass => git-gui--askpass.sh (100%)
diff --git a/.gitignore b/.gitignore
index ba845f3..5130b4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@ git-gui.tcl
GIT-GUI-BUILD-OPTIONS
GIT-VERSION-FILE
git-gui
+git-gui--askpass
lib/tclIndex
diff --git a/Makefile b/Makefile
index 2ac5f44..2cd160b 100644
--- a/Makefile
+++ b/Makefile
@@ -173,10 +173,13 @@ GIT-GUI-BUILD-OPTIONS: FORCE
@if grep -q '^[A-Z][A-Z_]*=@.*@$$' $@+; then echo "Unsubstituted build options in $@" >&2 && exit 1; fi
@if cmp $@+ $@ >/dev/null 2>&1; then $(RM) $@+; else mv $@+ $@; fi
+git-gui--askpass: git-gui--askpass.sh GIT-GUI-BUILD-OPTIONS generate-script.sh
+ $(QUIET_GEN)$(SHELL_PATH) generate-script.sh $@ $< ./GIT-GUI-BUILD-OPTIONS
+
ifdef GITGUI_WINDOWS_WRAPPER
all:: git-gui
endif
-all:: $(GITGUI_MAIN) lib/tclIndex $(ALL_MSGFILES)
+all:: $(GITGUI_MAIN) git-gui--askpass lib/tclIndex $(ALL_MSGFILES)
install: all
$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
@@ -215,7 +218,7 @@ dist-version: GIT-VERSION-FILE
@sed 's|^GITGUI_VERSION=||' <GIT-VERSION-FILE >$(TARDIR)/version
clean::
- $(RM_RF) $(GITGUI_MAIN) lib/tclIndex po/*.msg $(PO_TEMPLATE)
+ $(RM_RF) $(GITGUI_MAIN) git-gui--askpass lib/tclIndex po/*.msg $(PO_TEMPLATE)
$(RM_RF) GIT-VERSION-FILE GIT-GUI-BUILD-OPTIONS
ifdef GITGUI_WINDOWS_WRAPPER
$(RM_RF) git-gui
diff --git a/generate-script.sh b/generate-script.sh
new file mode 100755
index 0000000..0dd2da9
--- /dev/null
+++ b/generate-script.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if test $# -ne 3
+then
+ echo >&2 "USAGE: $0 <OUTPUT> <INPUT> <GIT-GUI-BUILD-OPTIONS>"
+ exit 1
+fi
+
+OUTPUT="$1"
+INPUT="$2"
+BUILD_OPTIONS="$3"
+
+. "$BUILD_OPTIONS"
+
+sed \
+ -e "1s|#!.*/sh|#!$SHELL_PATH|" \
+ -e "1,3s|^exec wish|exec '$TCLTK_PATH'|" \
+ "$INPUT" >"$OUTPUT"
+
+chmod a+x "$OUTPUT"
diff --git a/git-gui--askpass b/git-gui--askpass.sh
similarity index 100%
rename from git-gui--askpass
rename to git-gui--askpass.sh
diff --git a/meson.build b/meson.build
index 1cedc82..320ba09 100644
--- a/meson.build
+++ b/meson.build
@@ -38,14 +38,6 @@ version_file = custom_target(
build_always_stale: true,
)
-configure_file(
- input: 'git-gui--askpass',
- output: 'git-gui--askpass',
- copy: true,
- install: true,
- install_dir: get_option('libexecdir') / 'git-core',
-)
-
gitgui_main = 'git-gui'
gitgui_main_install_dir = get_option('libexecdir') / 'git-core'
@@ -61,6 +53,20 @@ if target_machine.system() == 'windows'
)
endif
+custom_target(
+ output: 'git-gui--askpass',
+ input: 'git-gui--askpass.sh',
+ command: [
+ shell,
+ meson.current_source_dir() / 'generate-script.sh',
+ '@OUTPUT@',
+ '@INPUT@',
+ meson.current_build_dir() / 'GIT-GUI-BUILD-OPTIONS',
+ ],
+ install: true,
+ install_dir: get_option('libexecdir') / 'git-core',
+)
+
custom_target(
input: 'git-gui.sh',
output: gitgui_main,
--
2.50.1.475.ge15fa7359c
^ permalink raw reply related [flat|nested] 25+ messages in thread* [PATCH v2 5/5] git-gui: ensure own version of git-gui--askpass is used
2025-07-31 8:06 ` [PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk " Carlo Marcelo Arenas Belón
` (3 preceding siblings ...)
2025-07-31 8:06 ` [PATCH v2 4/5] git-gui: honor TCLTK_PATH in git-gui--askpass Carlo Marcelo Arenas Belón
@ 2025-07-31 8:06 ` Carlo Marcelo Arenas Belón
2025-07-31 17:47 ` Johannes Sixt
4 siblings, 1 reply; 25+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2025-07-31 8:06 UTC (permalink / raw)
To: git
Cc: j6t, johannes.schindelin, mlevedahl, ps, gitster,
Carlo Marcelo Arenas Belón
When finding a location for the askpass helper, git will be asked
for its exec path, but if that git is not the same that called
git-gui then we might mistakenly point to its helper instead.
Assume that git-gui and the helper are colocated to derive its
path instead.
This is specially useful in macOS where a broken version of that
helper is provided by the system git.
Suggested-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
git-gui.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/git-gui.sh b/git-gui.sh
index 8bb121d..78324db 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1114,7 +1114,9 @@ citool {
# Suggest our implementation of askpass, if none is set
if {![info exists env(SSH_ASKPASS)]} {
- set env(SSH_ASKPASS) [file join [git --exec-path] git-gui--askpass]
+ set env(SSH_ASKPASS) \
+ [file join [file dirname [file normalize $::argv0]] \
+ git-gui--askpass]
}
######################################################################
--
2.50.1.475.ge15fa7359c
^ permalink raw reply related [flat|nested] 25+ messages in thread* Re: [PATCH v2 5/5] git-gui: ensure own version of git-gui--askpass is used
2025-07-31 8:06 ` [PATCH v2 5/5] git-gui: ensure own version of git-gui--askpass is used Carlo Marcelo Arenas Belón
@ 2025-07-31 17:47 ` Johannes Sixt
0 siblings, 0 replies; 25+ messages in thread
From: Johannes Sixt @ 2025-07-31 17:47 UTC (permalink / raw)
To: Carlo Marcelo Arenas Belón
Cc: johannes.schindelin, mlevedahl, ps, gitster, git
Am 31.07.25 um 10:06 schrieb Carlo Marcelo Arenas Belón:
> When finding a location for the askpass helper, git will be asked
> for its exec path, but if that git is not the same that called
> git-gui then we might mistakenly point to its helper instead.
>
> Assume that git-gui and the helper are colocated to derive its
> path instead.
>
> This is specially useful in macOS where a broken version of that
> helper is provided by the system git.
>
> Suggested-by: Mark Levedahl <mlevedahl@gmail.com>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
> git-gui.sh | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/git-gui.sh b/git-gui.sh
> index 8bb121d..78324db 100755
> --- a/git-gui.sh
> +++ b/git-gui.sh
> @@ -1114,7 +1114,9 @@ citool {
>
> # Suggest our implementation of askpass, if none is set
> if {![info exists env(SSH_ASKPASS)]} {
> - set env(SSH_ASKPASS) [file join [git --exec-path] git-gui--askpass]
> + set env(SSH_ASKPASS) \
> + [file join [file dirname [file normalize $::argv0]] \
> + git-gui--askpass]
> }
>
> ######################################################################
FYI, in my integration branch, this area looks like so without this change:
# Suggest our implementation of askpass, if none is set
if {![info exists env(SSH_ASKPASS)]} {
set env(SSH_ASKPASS) [file join [git --exec-path] git-gui--askpass]
}
if {![info exists env(GIT_ASKPASS)]} {
set env(GIT_ASKPASS) [file join [git --exec-path] git-gui--askpass]
}
if {![info exists env(GIT_ASK_YESNO)]} {
set env(GIT_ASK_YESNO) [file join [git --exec-path] git-gui--askyesno]
}
To help these other cases, I'll squash the following into this
commit:
diff --git a/git-gui.sh b/git-gui.sh
index 78324db2b587..f28a23f844cf 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1113,11 +1113,11 @@ citool {
## execution environment
# Suggest our implementation of askpass, if none is set
+set argv0dir [file dirname [file normalize $::argv0]]
if {![info exists env(SSH_ASKPASS)]} {
- set env(SSH_ASKPASS) \
- [file join [file dirname [file normalize $::argv0]] \
- git-gui--askpass]
+ set env(SSH_ASKPASS) [file join $argv0dir git-gui--askpass]
}
+unset argv0dir
######################################################################
##
^ permalink raw reply related [flat|nested] 25+ messages in thread