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

[PATCH] git-gui: make "Git GUI Here" Explorer extension more robust

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Mar 29, 2009, 22:30 UTC
Message-ID
<200903300030.03733.markus.heidelberg@web.de>

Starting git-gui via Windows Explorer shell extension caused problems when not started from the project directory, but from a directory within the project: starting the Explorer from the git-gui menu "Explore Working Copy" didn't work then.

Starting git-gui via Explorer shell extension from the .git directory didn't work at all.

To make these things possible, "cd .." until we see .git/
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
 windows/git-gui.sh |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/windows/git-gui.sh b/windows/git-gui.sh
index 53c3a94..16c4a2a 100644
--- a/windows/git-gui.sh
+++ b/windows/git-gui.sh
@@ -4,6 +4,9 @@ exec wish "$0" -- "$@"
 
 if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
 	cd [lindex $argv 1]
+	while { ![file isdirectory .git] } {
+		cd ..
+	}
 	set argv [lrange $argv 2 end]
 	incr argc -2
 }
-- 
1.6.2.1.409.gad7bf.dirty
Next: Johannes Schindelin
Message 1 of 10 in “git-gui: make "Git GUI Here" Explorer extension more robust”
  1. git-gui: make "Git GUI Here" Explorer extension more robustMarkus Heidelberg, Mar 29, 2009
  2. Johannes SchindelinMar 30, 2009
  3. Markus HeidelbergMar 30, 2009
  4. Johannes SchindelinMar 30, 2009
  5. Shawn O. PearceMar 30, 2009
  6. Markus HeidelbergMar 30, 2009
  7. Shawn O. PearceMar 30, 2009
  8. Giuseppe BilottaMar 30, 2009
  9. Giuseppe BilottaMar 30, 2009
  10. Markus HeidelbergMar 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.