microsoft / microsoft/vscode-remote-release
WSL Devcontainer inconsistence between ~/.gitconfig and ~/.config/git/config
@chrmarti is already working on this.
Since May 29, 2024.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Issue:
When starting VSCode Devcontainer in WSL, and that linux has git config in ~/.gitconfig, VSCode copies that one to the Devcontainer, and ignores if a c:\Users<username>/.gitconfig exists, resulting in everything working fine.
If instead the linux git config is in ~/.config/git/config when starting VSCode Devcontainer in WSL, it will copy both that one
and the one from c:\ if it exists. to the devcontainer, which ends up merging both, prioritizing windows gitconfig.
Assuming the intent is to prioritize WSL git config if VSCode Devcontainer was started in WSL and such a config exists there, it should not care if its in ~/.gitconfig or ~/.config/git/config when deciding to ignore c:\ config
Environment:
- VSCode Version: 1.89.1
- Local OS Version: Windows 11 (Windows_NT x64 10.0.22621)
- Remote OS Version: Ubuntu 22.04.1 LTS
- Remote Extension/Connection Type: WSL2
Steps to Reproduce:
- In Windows have a config in: c:\Users<username>.gitconfig
- In WSL have a config in: ~/.config/git/config (XDG_HOME)
- Have no config files in WSL ~/.gitconfig
- End result is WSL git config becomes secondary or ignored depending on whats in c:\ or wsl config
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.