git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/5] git-gui: workaround deprecation of Tcl/Tk 8.5 in macOS

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Jul 31, 2025, 08:06 UTC
Message-ID
<20250731080628.27917-1-carenas@gmail.com>
In-Reply-To
<20250730164052.15371-1-carenas@gmail.com>

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
Previous: Junio C HamanoNext: Carlo Marcelo Arenas Belón
Message 19 of 25 in “git-gui: workaround deprecation of Tcl/TK 8.5 in macOS”
  1. 0/5 git-gui: workaround deprecation of Tcl/TK 8.5 in macOSCarlo Marcelo Arenas Belón, Jul 30, 2025
  2. 1/5 git-gui: remove uname_O in MakefileCarlo Marcelo Arenas Belón, Jul 30, 2025
  3. Junio C HamanoJul 30, 2025
  4. 2/5 git-gui: fix dependency of GITGUI_MAIN on generatorCarlo Marcelo Arenas Belón, Jul 30, 2025
  5. 3/5 git-gui: retire Git Gui.appCarlo Marcelo Arenas Belón, Jul 30, 2025
  6. 4/5 git-gui: honor TCLTK_PATH in git-gui--askpassCarlo Marcelo Arenas Belón, Jul 30, 2025
  7. Johannes SixtJul 30, 2025
  8. Patrick SteinhardtJul 31, 2025
  9. 5/5 git-gui: ensure own version of git-gui--askpass is usedCarlo Marcelo Arenas Belón, Jul 30, 2025
  10. Johannes SixtJul 30, 2025
  11. Mark LevedahlJul 30, 2025
  12. Johannes SixtJul 30, 2025
  13. Carlo ArenasJul 30, 2025
  14. Patrick SteinhardtJul 31, 2025
  15. Junio C HamanoJul 30, 2025
  16. Junio C HamanoJul 30, 2025
  17. Carlo ArenasJul 30, 2025
  18. Junio C HamanoJul 31, 2025
  19. 0/5 git-gui: workaround deprecation of Tcl/Tk 8.5 in macOSCarlo Marcelo Arenas Belón, Jul 31, 2025
  20. 1/5 git-gui: remove uname_O in MakefileCarlo Marcelo Arenas Belón, Jul 31, 2025
  21. 2/5 git-gui: fix dependency of GITGUI_MAIN on generatorCarlo Marcelo Arenas Belón, Jul 31, 2025
  22. 3/5 git-gui: retire Git Gui.appCarlo Marcelo Arenas Belón, Jul 31, 2025
  23. 4/5 git-gui: honor TCLTK_PATH in git-gui--askpassCarlo Marcelo Arenas Belón, Jul 31, 2025
  24. 5/5 git-gui: ensure own version of git-gui--askpass is usedCarlo Marcelo Arenas Belón, Jul 31, 2025
  25. Johannes SixtJul 31, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.