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

[PATCH] git-gui (Win): make "Explore Working Copy" more robust

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Mar 31, 2009, 23:55 UTC
Message-ID
<200904010155.37318.markus.heidelberg@web.de>

Starting the Explorer from the git-gui menu "Explore Working Copy" didn't work, when git-gui was started via Windows Explorer shell extension (Git GUI Here) from a directory within the project. The Explorer raised an error message like this:

    Path "C:/somedir/worktree" is not available or not a directory

It worked when started from the project directory itself, because then the path argument for the Explorer was just '.' (current directory) without any problematic forward slashes.

To make it work, convert the path given as argument to explorer.exe to its native format with backslashes.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---

Now this is the real location of the problem in contrast of the workaround attempt from 2 days before. I've also tested this change with xdg-open.

 git-gui.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index b3aa732..712fe27 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1924,7 +1924,7 @@ proc do_explore {} {
 		# freedesktop.org-conforming system is our best shot
 		set explorer "xdg-open"
 	}
-	eval exec $explorer [file dirname [gitdir]] &
+	eval exec $explorer [list [file nativename [file dirname [gitdir]]]] &
 }
 
 set is_quitting 0
-- 
1.6.2.1.428.g41b20c
Message 1 of 1 in “git-gui (Win): make "Explore Working Copy" more robust”
  1. git-gui (Win): make "Explore Working Copy" more robustMarkus Heidelberg, Mar 31, 2009

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.