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

[PATCH v0 3/4] git-gui - use cygstart to browse on Cygwin

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Jun 24, 2023, 21:23 UTC
Message-ID
<20230624212347.179656-4-mlevedahl@gmail.com>
In-Reply-To
<20230624212347.179656-1-mlevedahl@gmail.com>

Pre-2012, git-gui enabled the "Repository->Explore Working Copy" menu on Cygwin, offering open a Windows graphical file browser at the root working directory. The old code relied upon internal use of Windows pathnames, while git-gui must use unix pathnames on Cygwin since 2012, so was removed in a previous patch.

A base install of Cygwin provides the /bin/cygstart utility that runs arbtitrary Windows applications after translating unix pathnames to Windows. Adding the --explore option guarantees that the Windows file explorer is opened, regardless of the supplied pathname's file type and avoiding possibility of some other action being taken.

So, teach git-gui to use cygstart --explore on Cygwin, restoring the pre-2012 behavior of opening a Windows file explorer for browsing.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 git-gui.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/git-gui.sh b/git-gui.sh
index b5dba80..523770a 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2276,6 +2276,8 @@ proc do_git_gui {} {
 proc get_explorer {} {
 	if {[is_Windows]} {
 		set explorer "explorer.exe"
+	} elseif {[is_Cygwin]} {
+		set explorer "/bin/cygstart.exe --explore"
 	} elseif {[is_MacOSX]} {
 		set explorer "open"
 	} else {
-- 
2.41.0.99.19
Previous: Mark LevedahlNext: Mark Levedahl
Message 6 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.