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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux