Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable GfW no longer runs from network drive #2036

Closed
1 task done
cfbrobak opened this issue Jan 22, 2019 · 10 comments
Closed
1 task done

Portable GfW no longer runs from network drive #2036

cfbrobak opened this issue Jan 22, 2019 · 10 comments
Assignees
Milestone

Comments

@cfbrobak
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
PortableGit-2.20.1-64-bit.7z.exe
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 6.1.7601]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Portable GfW unpacked in directory "H:\DevTools\pgm\Git-2.20.1" by running the .exe file.
H: is a mapped network drive.
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Version 2.18.0 is also installed in the same way (directory "H:\DevTools\pgm\Git-2.18.0") and runs without problems.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

PowerShell or cmd.exe

- Executing "H:\DevTools\pgm\Git-2.20.1\git-bash.exe" does nothing and returns nothing.
- Executing "H:\DevTools\pgm\Git-2.20.1\cmd\git.exe" returns "Invalid executable path:".
@PhilipOakley
Copy link

This sounds like a symptom of another 'corner case' problem that's recently been reported for some files on network devices (#1989), Maybe.

@dscho
Copy link
Member

dscho commented Jan 29, 2019

This sounds like a symptom of another 'corner case' problem that's recently been reported for some files on network devices (#1989), Maybe.

I am not quite sure that it is the same issue. It sounds more related to recent changes in git-wrapper.c...

dscho added a commit to dscho/MINGW-packages that referenced this issue Jan 29, 2019
Since 521a655 (git: fix 'cmd/git.exe' cannot launcher symlink,
2018-12-08), we always try to resolve the Git wrapper's executable path
if it is a symbolic link. We do that by calling GetFinalPathNByHandle(),
but that introduced a regression where we would not handle UNC paths
correctly.

This fixes git-for-windows/git#2036

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this Jan 29, 2019
@dscho dscho added this to the v2.20.1(2) milestone Jan 29, 2019
dscho added a commit to git-for-windows/build-extra that referenced this issue Jan 29, 2019
Portable Git [can be launched via network paths
again](git-for-windows/git#2036).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member

dscho commented Jan 30, 2019

A new snapshot is available that should fix this issue. Could I ask y'all to please test?

@cfbrobak
Copy link
Author

I just tried this snapshot: PortableGit-prerelease-2.20.1.windows.1.27.g9f16cdd421-64-bit.7z.exe
Unfortunately, the problem still seems to be there.

@dscho
Copy link
Member

dscho commented Jan 30, 2019

@cfbrobak thanks for testing. However, I just unpacked that portable Git into D:\test-git\portable-2.20.1-cmd-fix and then ran this:

PS C:\Users\me> & '\\localhost\d$\test-git\portable-2.20.1-cmd-fix\cmd\git.exe' version
git version 2.20.1.windows.1.27.g9f16cdd421

So it works here. If it fails on your side, could you try the same as I did? And if that works, provide a bit more detail what else you did? Like, details about your particular setup, e.g. is this a Samba drive or something more obscure?

@cfbrobak
Copy link
Author

cfbrobak commented Jan 31, 2019

The problem is only seen if Portable GfW is unpacked on a network drive, not when unpacked on a local drive as in your own test.
My H: drive is mapped to a share on a large (27 TB) NTFS filesystem provided by some NAS box.
Normally, I do not use the UNC path when running Git but use the drive letter instead.
A test like yours outputs (actual share path is removed):

PS C:\> & '\\<share>\DevTools\Git-2.20.1-x64\cmd\git.exe' version
Invalid executable path:
PS C:\> & '\\<share>\DevTools\Git-2.18.0-x64\cmd\git.exe' version
git version 2.18.0.windows.1

As you can see version 2.18.0 works, as have all(?) previous versions.
I should add that the 2.20.1 version actually is the snapshot, not the released version.

@dscho
Copy link
Member

dscho commented Feb 5, 2019

Sorry, I just tried on a network drive that is on a different continent, and it still worked:

PS C:\Users\me> \\us-east2\users\me\portable-20190129\cmd\git version
git version 2.20.1.windows.1.27.g9f16cdd421

The same happens when I map a Samba directory from an Ubuntu VM:

PS C:\Users\me> Z:\portable-20190129\cmd\git version
git version 2.20.1.windows.1.27.g9f16cdd421

This all makes me think that it is actually very important to know more about your setup, or maybe there is a chance that you can run some custom-built code in a debugger? You would have to install Git for Windows' SDK for that. Alternatively, I would need to have interactive access to the setup (we could Live Share so you can verify that I do not do anything untoward with your system). If none of that is an option, there is unfortunately nothing I can do to help.

@cfbrobak
Copy link
Author

cfbrobak commented Feb 6, 2019

Unfortunately, I am unable to do any of the things that you suggest, the reason being that this is a computer at my job.
What I did do was to install a number of previous Portable GfW versions. It turns out the problem was introduced after version 2.19.2, that is, version 2.19.2 works and 2.20.0 does not work. I don't know if that is of any help.
Anyway, thanks for looking into this issue.

@dscho
Copy link
Member

dscho commented Feb 6, 2019

Sorry, those are too many obstacles for me to help.

@natescham

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants