git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust
@ 2009-03-29 22:30 Markus Heidelberg
  2009-03-30  0:43 ` Johannes Schindelin
  0 siblings, 1 reply; 10+ messages in thread
From: Markus Heidelberg @ 2009-03-29 22:30 UTC (permalink / raw)
  To: msysgit; +Cc: git, Shawn O. Pearce

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-04-01  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 22:30 [PATCH] git-gui: make "Git GUI Here" Explorer extension more robust Markus Heidelberg
2009-03-30  0:43 ` Johannes Schindelin
2009-03-30  6:51   ` Markus Heidelberg
2009-03-30  8:03     ` Johannes Schindelin
2009-03-30 14:14       ` Shawn O. Pearce
2009-03-30 20:20       ` Markus Heidelberg
2009-03-30 14:15     ` Shawn O. Pearce
2009-03-30 22:49       ` Giuseppe Bilotta
2009-03-30 22:49       ` Giuseppe Bilotta
2009-03-31 23:59         ` Markus Heidelberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).