git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pat Thoyts <patthoyts@googlemail.com>
To: Markus Heidelberg <markus.heidelberg@web.de>
Cc: Heiko Voigt <hvoigt@hvoigt.net>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org,
	msysGit Mailinglist <msysgit@googlegroups.com>
Subject: Re: [msysGit] [GIT GUI PATCH] git-gui: fix open explorer window on  Windows 7
Date: Thu, 25 Feb 2010 22:49:47 +0000	[thread overview]
Message-ID: <a5b261831002251449r7ac437f3h478727764ac755eb@mail.gmail.com> (raw)
In-Reply-To: <201002252323.13240.markus.heidelberg@web.de>

On 25 February 2010 22:23, Markus Heidelberg <markus.heidelberg@web.de> wrote:
> Heiko Voigt, 2010-02-25 21:30:
>> On Wed, Feb 24, 2010 at 12:15:03PM +0000, Pat Thoyts wrote:
>> > On 23 February 2010 22:52, Heiko Voigt <hvoigt@hvoigt.net> wrote:
>> > > It seems that Windows 7's explorer is not capable to cope with paths
>> > > that contain forward slashes as path seperator. We thus substitute slash
>> > > with the platforms native backslash.
>> > >
>> >
>> > What bug are you actually addressing here? How can I reproduce it? My
>> > experience on Windows 7 is that there is no problem but I assume I'm
>> > doing a different operation. If I use the git-gui  "Explore working
>> > copy" it opens the Windows explorer for me just fine.
>>
>> Very strange, again another inconsistency between Windowses? I can
>> reproduce this even on Windows XP. I am using the current devel branches
>> of msysgit (msysgit and git). It happens when using the
>> "Repository->Explore working copy" menu item. The Windows 7 I tested
>> this on is 32-bit Professional. Which Windows 7 are you using?
>
> You should tell, how exactly you start git-gui, because this makes the
> difference in this bug.

I have Windows 7 64 bit Ultimate - but I doubt the version of Win7 is
going to matter here.

In my case, using the current release of msysGit (1.6.5.1.1367.gcd48)
can launch the Windows explorer and so can the current devel branch of
msysgit. I launch these from the windows cmd shell using the scripts
in msysgit\cmd\ for the devel version

But lets be real certain we are runing the script in the
msysgit\git\git-gui directory:

C:\src\msysgit\git\git-gui>set
PATH=c:\src\msysgit\bin;c:\src\msysgit\mingw\bin;%PATH%
C:\src\msysgit\git\git-gui>tclkit86 git-gui.sh

This is now guaranteed running the script mentioned and it uses the
'lib' subfolder from this directory too. Help About says git-gui
version @@GITGUI_VERSION@@ and git version 1.7.0.rc2.1441.g8e037 as I
built and installed this a few days ago.

However, I notice that it is not actually browsing the working folder
when it launches the browser - it has actually opened "My Documents".
I presume this is the bug you intend to fix -- and applying your patch
confirms that it solves this issue.

Can you please give enough information in the commit message to let us
know what issue is being solved by the changes provided.

To avoid any confusion I confirm the following patch ensures that
exploring the working folder on Windows correctly opens the working
folder of the current repository.

Tested-by: Pat Thoyts <patthoyts@users.sourceforge.net>

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index cd8da37..82c352b 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -2099,15 +2099,17 @@ proc do_git_gui {} {
 proc do_explore {} {
        global _gitworktree
        set explorer {}
+       set path $_gitworktree
        if {[is_Cygwin] || [is_Windows]} {
                set explorer "explorer.exe"
+               set path [list [file nativename $path]]
        } elseif {[is_MacOSX]} {
                set explorer "open"
        } else {
                # freedesktop.org-conforming system is our best shot
                set explorer "xdg-open"
        }
-       eval exec $explorer $_gitworktree &
+       eval exec $explorer $path &
 }

 set is_quitting 0

      reply	other threads:[~2010-02-25 22:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 22:52 [GIT GUI PATCH] git-gui: fix open explorer window on Windows 7 Heiko Voigt
2010-02-24  0:14 ` Markus Heidelberg
2010-02-24  6:22   ` Giuseppe Bilotta
2010-02-24 12:12     ` [msysGit] " Pat Thoyts
2010-02-25  0:14       ` [PATCH] git-gui: fix "Explore Working Copy" for Windows again Markus Heidelberg
2010-02-25 20:44         ` Heiko Voigt
2010-02-25 23:00           ` Pat Thoyts
2010-02-26  0:46           ` Johannes Schindelin
2010-02-27 21:14             ` Heiko Voigt
2010-02-24 12:15 ` [msysGit] [GIT GUI PATCH] git-gui: fix open explorer window on Windows 7 Pat Thoyts
2010-02-25 20:30   ` Heiko Voigt
2010-02-25 22:23     ` [msysGit] " Markus Heidelberg
2010-02-25 22:49       ` Pat Thoyts [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5b261831002251449r7ac437f3h478727764ac755eb@mail.gmail.com \
    --to=patthoyts@googlemail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=markus.heidelberg@web.de \
    --cc=msysgit@googlegroups.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).