Message ID | 20230624212347.179656-4-mlevedahl@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Remove obsolete Cygwin support from git-gui | expand |
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 {
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(+)