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

Settings could not be read from \\wsl$ #9760

Merged
merged 4 commits into from Dec 11, 2021

Conversation

gerhardol
Copy link
Member

A few follow up from #9702

Proposed changes

A few a follow up related to WSL Git.

  • Settings could not be read from \wsl$

The URI is invalid, why the path has to be read with a StreamReader.
This caused various issues like remotes could not be disabled

This is not related to WSL Git, it also occurs if Windows Git is used.
This is one reason why insiders Windows builds also supports wsl.localhost
(\wsl$ paths will be required to utilize wsl git. This is a feature but must be documented.)

This problem was primarily seen when deactivating remotes, an exception occurred (as a settings file were not refreshed).

  • WSL: Remotes for filepaths could not be saved

Paths must be manipulated to match Git executable.

  • WSL: Git internal paths were incorrectly resolved

Affected Remote mostly

  • WSL: force-push was inserted incorrectly

The --force-with-lease offered if a push is refused assumed that the command started with "push".
The option is "inserted" in the command string.
WSL Git has the distribution first, why the insert point differs.

Note: The output from git push is not always available for WSL Git (for instance at home).
At work it works though.

Test methodology

Manual

Merge strategy

  • Rebase merge (PR submitter must change the commit message for the last commit).

✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Dec 1, 2021
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible, have not run

GitCommands/Git/GitModule.cs Outdated Show resolved Hide resolved
@gerhardol gerhardol merged commit 1097a21 into gitextensions:master Dec 11, 2021
@ghost ghost added this to the vNext milestone Dec 11, 2021
@gerhardol gerhardol deleted the feature/i9702-wsl-remotes branch December 11, 2021 16:05
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

Successfully merging this pull request may close these issues.

None yet

3 participants