Settings could not be read from \\wsl$ #9760
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A few follow up from #9702
Proposed changes
A few a follow up related to WSL Git.
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).
Paths must be manipulated to match Git executable.
Affected Remote mostly
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
✒️ I contribute this code under The Developer Certificate of Origin.