Re: [msysGit] [GIT GUI PATCH] git-gui: fix open explorer window on Windows 7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25 February 2010 22:23, Markus Heidelberg <markus.heidelberg@xxxxxx> 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@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]