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
Mark Levedahl <mlevedahl@gmail.com>
Date
Jun 25, 2023, 12:10 UTC
Message-ID
<16959998-cb50-6f7d-370f-22c7293c89c2@gmail.com>
In-Reply-To
<e04e28e2-2308-1db8-9462-5f81aeff1155@gmail.com>
On 6/25/23 07:26, Mark Levedahl wrote:
Show 33 quoted lines
>
> On 6/24/23 19:30, Junio C Hamano wrote: git-gui has three independent 
> functions (is_Cygwin, is_Windows, and is_MaxOSX), each determine if 
> running on that platform, and "generic Unix/Linux" can be considered 
> the result if all three functions return false. In Pratyush's tree, 
> those three functions essentially are:
>
> is_Cygwin: $::tcl_platform(os) startswith("CYGWIN")
>
> is_MaxOSX: [tk windowingsystem] == "AQUA"
>
> is_Windows: $::tcl_platform(platform) == "Windows"
>
> It turns out, only one of the . is ever true, and none are true on 
> Linux. So, the if/else tree above is not confused by Windows / Cygwin.
>
> But, different Tcl/Tk signatures as platforms evolve could cause 
> problems. A better design might be to just have a $HOSTTYPE variable 
> set once, perhaps in startup, perhaps even by the makefile, to assure 
> exactly one hosttype is ever active and make this clear to others. 
> Normal configuration checking in the makefile could have uncovered 
> this whole problem in 2012. But, this is a possible cleanup topic for 
> another day.
>
> So, the code under the is_Windows and is_Cygwin branches of the 
> if/else trees are now completely independent, and the is_Windows 
> branch is never entered on Cygwin.
>
>
> Thank you,
>
> Mark
>
A follow up - I have Cygwin in a Windows VM on my laptop, no G4W, no Mac ...
Cygwin gives:   $::tcl_platform(os) = CYGWIN_NT-10.0-22621
                 $::tcl_platform(platform) = unix
                 tk windowingsystem = x11
Linux gives     $::tcl_platform(os) = Linux
                 $::tcl_platform(platform) = unix
                 tk windowingsystem = x11
So, neither Cygwin nor Linux trigger the checks for is_Windows or is_MacOSX
Previous: Mark LevedahlNext: Junio C Hamano
Message 12 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.