Devcontainer support for import of Git config files within the XDG_CONFIG_HOME/git directory
I am following the XDG Base Directory spec and my Git config file(s) are located in ~/.config/git directory on my WSL2 instance. My current understanding of the Devcontainers remote extension is that the "dev.containers.copyGitConfig" expects users to have all of their Git config within ~/.gitconfig file.
I'd like to request the addition of a feature to support sourcing Git config and any includes from the Git config file from either:
- $HOME/.gitconfig
- $HOME/.config/git/config
- $XDG_CONFIG_HOME/git/config
Further, if the config file provides one or more of include.path = ~/.config/git/filename or include.path = ~/otherfile directives, the files should also be copied into the same locations within the Devcontainer user home directory.
One suggestion might be to provide an additional optional Devcontainers config parameter to specify the path to the parent config file, with the extension testing for the presence of the file, and parsing the file for the include.path file references to be copied.
Environment:
- VSCode Version: 1.92.0
- Local OS Version: MacOS 14.5
- Remote OS Version: Ubuntu 22.04.4 LTS
- Remote Extension/Connection Type: Remote Devcontainer via SSH
References
- https://git-scm.com/docs/git-config#FILES