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

Git on network drive broken after upgrade to 1.44.0 #94882

Closed
limenet opened this issue Apr 10, 2020 · 11 comments
Closed

Git on network drive broken after upgrade to 1.44.0 #94882

limenet opened this issue Apr 10, 2020 · 11 comments
Assignees
Labels
candidate Issue identified as probable candidate for fixing in the next release git GIT issues verified Verification succeeded

Comments

@limenet
Copy link

limenet commented Apr 10, 2020

  • VSCode Version: 1.44.0
  • OS Version: Windows 10.0.18363

Steps to Reproduce:

  1. Upgrade to 1.44.0
  2. Open a project located on a network drive (e.g. Z:\project-name which points to \\code.swift\code\project-name)
  3. Modify a file, e.g. .npmrc
  4. Switch to Source Control
  5. Observe
    1. The file cannot be added/diffed etc.
    2. The filename shown contains the network drive letter and/or the project name

When using the latest Insider (from Apr 09) with no extensions, the behavior is similar but slightly different:

  1. The file can be added/diffed
  2. The file cannot be unstaged

It appears that the first backslash in the path (after Z:) is discarded as is the project-name portion.

As implied by the title, the issue only occurs for the network drive projects and not for local projects on drive C:\. In those cases, the Git integration works like it did in 1.43.x and there is no smaller and greyed-out path portion visible next to the filename either.

Does this issue occur when all extensions are disabled?: Yes

Please let me know if you need any further information and Happy Easter!

Screenshots

(all taken using the same file)

1.44.0

image

image

Insider

image

image

Git Log:

> git ls-files --stage -- z:project-name\.npmrc
fatal: z:project-name\.npmrc: 'z:project-name\.npmrc' is outside repository at '//code.swift/code/project-name'
> git ls-files --stage -- z:project-name\.npmrc
> git branch
fatal: z:project-name\.npmrc: 'z:project-name\.npmrc' is outside repository at '//code.swift/code/project-name'
> git reset -q HEAD -- z:project-name\.npmrc
fatal: z:project-name\.npmrc: 'z:project-name\.npmrc' is outside repository at '//code.swift/code/project-name'
> git ls-files --stage -- z:project-name\.npmrc
fatal: z:project-name\.npmrc: 'z:project-name\.npmrc' is outside repository at '//code.swift/code/project-name'
> git ls-files --stage -- z:project-name\.npmrc
fatal: z:project-name\.npmrc: 'z:project-name\.npmrc' is outside repository at '//code.swift/code/project-name'
@vscodebot
Copy link

vscodebot bot commented Apr 10, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@eamodio eamodio self-assigned this Apr 10, 2020
@eamodio eamodio added the git GIT issues label Apr 10, 2020
@eamodio eamodio added this to the April 2020 milestone Apr 10, 2020
@eamodio eamodio added the candidate Issue identified as probable candidate for fixing in the next release label Apr 10, 2020
@eamodio
Copy link
Contributor

eamodio commented Apr 10, 2020

@limenet I can't seem to reproduce this myself, but I could simulate the behavior you were seeing if there was a rogue trailing backslash -- so I've made a change that should hopefully resolve it. Can you please try out Monday's insiders build and see if the issue is resolved for you? Thanks!

@eamodio eamodio added the author-verification-requested Issues potentially verifiable by issue author label Apr 10, 2020
@limenet
Copy link
Author

limenet commented Apr 14, 2020

@eamodio thank you for your quick fix!

Now the error messages don't appear anymore and it mostly works but vscode (Insider build from this morning) appears to be confused about the file location:

  1. Open Insider
  2. Drag & drop the project on the network drive (same as in the initial report)
  3. Modify text file .npmrc

Git detects the change but lists the file under its full path and when clicking the "open file" icon it also opens it at the full path instead of the relative path respective to the workspace root:

image

The first tab is from when I opened the file from the workspace, the second one from "open file" in the Git sidebar. Both tabs refer to the same file although the first (workspace) tab uses the drive letter Z:\ and the second uses the network path \\code.swift\....

@github-actions
Copy link

This bug has been fixed in to the latest release of VS Code Insiders!

@limenet, you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text /verified to let us know. If not, please ensure you're on version c8826e4 of Insiders (today's or later - you can use Help: About in the command pallette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@limenet
Copy link
Author

limenet commented Apr 15, 2020

/verified

Thank you very much, @eamodio !

@eamodio
Copy link
Contributor

eamodio commented Apr 15, 2020

@limenet is the issue you mentioned here: #94882 (comment) gone now too?

@limenet
Copy link
Author

limenet commented Apr 15, 2020

@eamodio yes, that issue is now gone as well!

@eamodio
Copy link
Contributor

eamodio commented Apr 15, 2020

Awesome, thanks!

@alexr00 alexr00 reopened this Apr 16, 2020
eamodio pushed a commit that referenced this issue Apr 16, 2020
if somehow `networkPath` had a trailing \, it would cause this behavior
eamodio pushed a commit that referenced this issue Apr 16, 2020
if somehow `networkPath` had a trailing \, it would cause this behavior
@alexr00 alexr00 closed this as completed Apr 16, 2020
@eamodio
Copy link
Contributor

eamodio commented Apr 16, 2020

Verify steps:

  • Open a project located on a network drive (e.g. Z:\project-name which points to \code.swift\code\project-name)
  • Modify a file, e.g. .npmrc
  • Switch to Source Control
  • Observe
    • The file can be added/diffed etc.
    • The filename shown contains a relative path (not a wrong absolute path)

@sbatten
Copy link
Member

sbatten commented Apr 16, 2020

Needed to update to git version 2.26.1.windows.1, I was on 2.25.x

@sbatten sbatten added the verified Verification succeeded label Apr 16, 2020
@klaasnicolaas
Copy link

No idea if it is allowed to respond to a closed issue.

I have the same problems (can no longer make or stash commits) and use version 1.44.2 of VScode and Git version 2.26.2. Only when I downgraded Git to 2.24.x, I got no more errors with "is outside repository at ...".

@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
candidate Issue identified as probable candidate for fixing in the next release git GIT issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants
@limenet @eamodio @sbatten @klaasnicolaas @alexr00 and others