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

Re: [PATCH v0 0/4] Remove obsolete Cygwin support from git-gui

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 24, 2023, 23:30 UTC
Message-ID
<xmqq8rc8781p.fsf@gitster.g>
In-Reply-To
<20230624212347.179656-1-mlevedahl@gmail.com>
Mark Levedahl <mlevedahl@gmail.com> writes:
Show 17 quoted lines
> git-gui has many snippets of code guarded by an is_Cygwin test, all of
> which target a problematic hybrid Cygwin/Windows 8.4.1 Tcl/Tk removed in
> March 2012. That is when Cygwin switched to a well-supported unix/X11
> Tcl/Tk package.  64-bit Cygwin was released later so has always had the
> unix/X11 package. git-gui runs as-is on more recent Cygwin, treating it
> as a Linux variant, though two functions are disabled.
>
> The old Tcl/Tk understood Windows pathnames, so git-gui's Cygwin
> specific code uses Windows pathnames. The unix/X11 code requires use of
> unix pathnames, so none of the Cygwin specific code is compatible, and
> all should be removed.
>
> Fortunately, the is_Cygwin funcion in git-gui (on the git master branch)
> relies upon the old Tcl/Tk and doesn't detect Cygwin. But, commit
> c5766eae6f2b002396b6cd4f85b62317b707174e on the git-gui master branch
> "fixed" is_Cygwin, enabling the incompatible code, so upstream git-gui
> is now broken on Cygwin.

Here I presume "upstream git-gui master" refers to a5005ded (Merge branch 'ab/makeflags', 2023-01-25) sitting at 'master' in Pratyush's https://github.com/prati0100/git-gui/ repository.

Show 10 quoted lines
> There is Cygwin specific code in the Makefile, intended to allow a
> completely unsupported configuration with a Windows TclTk.  This code
> misdetects the configuration, creating a non-portable installation. The
> Cygwin git maintainer comments this code out. The code should be
> removed.
>
> ...
>
> patch 1 removes the obsolete Makefile code
> patch 2 removes all obsolete git-gui.sh code, wrapped in is_Cygwin...

As it has been quite a while since I had access to any Windows box or Cygwin, but the earlier two patches look obviously correct to me.

Show 7 quoted lines
> The existing code for file browsing and creating a desktop icon is
> shared with Git For Windows support, and uses Windows pathnames. This
> code does not work on Cygwin, and needs replacement.  These functions
> have not worked since 2012.
> ...
> patch 3 implements Cygwin specific file browsing support
> patch 4 implemetns Cygwin specific desktop icon support
Both of these two patches do
	if {[is_Windows]} {
		... do Windows thing ...
+	} elseif {[is_Cygwin]} {
+		... do Cygwin thing ...
	} elseif {[is_MacOSX]} {
		... do macOS thing ...
	} else {
		... do it for others ...
	}

which I do not quite understand how the existing code meshes with your "is shared with Git For Windows support", though. If "is shared with GfW" is to be trusted, on a modern Cygwin box, "is_Windows" would be yielding true (that is the only way the "do Windows thing" block will be entered on Cygwin box, sharing the support with GfW. But then, adding elseif _after_ we check for Windows would be pointless. Puzzled...

Thanks.
Previous: Mark LevedahlNext: Junio C Hamano
Message 8 of 27 in “Remove obsolete Cygwin support from git-gui”
  1. 0/4 Remove obsolete Cygwin support from git-guiMark Levedahl, Jun 24, 2023
  2. 1/4 git gui Makefile - remove Cygwin modiificationsMark Levedahl, Jun 24, 2023
  3. 2/4 git-gui - remove obsolete Cygwin specific codeMark Levedahl, Jun 24, 2023
  4. Eric SunshineJun 25, 2023
  5. Mark LevedahlJun 25, 2023
  6. 3/4 git-gui - use cygstart to browse on CygwinMark Levedahl, Jun 24, 2023
  7. 4/4 git-gui - use mkshortcut on CygwinMark Levedahl, Jun 24, 2023
  8. Junio C HamanoJun 24, 2023
  9. Junio C HamanoJun 24, 2023
  10. Mark LevedahlJun 25, 2023
  11. Mark LevedahlJun 25, 2023
  12. Mark LevedahlJun 25, 2023
  13. Junio C HamanoJun 25, 2023
  14. Mark LevedahlJun 25, 2023
  15. Junio C HamanoJun 26, 2023
  16. Mark LevedahlJun 26, 2023
  17. 0/4 Remove obsolete Cygwin support from git-guiMark Levedahl, Jun 26, 2023
  18. 1/4 git gui Makefile - remove Cygwin modificationsMark Levedahl, Jun 26, 2023
  19. 2/4 git-gui - remove obsolete Cygwin specific codeMark Levedahl, Jun 26, 2023
  20. 3/4 git-gui - use cygstart to browse on CygwinMark Levedahl, Jun 26, 2023
  21. 4/4 git-gui - use mkshortcut on CygwinMark Levedahl, Jun 26, 2023
  22. Johannes SchindelinJun 27, 2023
  23. Junio C HamanoJun 27, 2023
  24. Mark LevedahlAug 5, 2023
  25. Pratyush YadavAug 24, 2023
  26. Mark LevedahlAug 29, 2023
  27. Junio C HamanoAug 29, 2023

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.