-
Notifications
You must be signed in to change notification settings - Fork 2.7k
includeIf not working with WSL/Network paths #2563
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
Comments
What is the output of A recent Git for Windows version started to resolve symbolic links/mount points/whatever when trying to canonicalize absolute directories, and that most likely changed the behavior of the |
That gives Sadly switching to
doesn't work either :/ |
Those two paths look different to me... one ends in |
According to the docs (https://git-scm.com/docs/git-config#_conditional_includes) this should work though? I want every folder inside of /work/ to use the work gitconfig etc. |
Maybe you can build Git for Windows, start it in |
Line 244 in 9c98e1c
|
that's sadly a bit out of my capabilities |
This is sadly still an issue, is there any other way I can help get this fixed without providing a PR? |
I should have spotted this right away, sorry. There are two problems with this:
In short, I think that this should work for you: ; work config
[includeIf "gitdir/i://wsl$/Ubuntu/home/stan/projects/work/.git"]
path = ../.gitconfig-work |
Whoops, I forgot one crucial thing. For technical reasons, Git for Windows assumes paths starting with a single slash to be relative to the MSYS2 root (i.e. the directory into which Git for Windows was installed, usually ; work config
[includeIf "gitdir/i:///wsl$/Ubuntu/home/stan/projects/work/.git"]
path = ../.gitconfig-work
Actually, that is an assumption on my part that might not even be true, if you have multiple worktrees inside that directory. Note, however, that the Also note that the |
Okay thank you for the explanation, my head hurts a bit but that is fine. So my setup now is:
This contains: [includeIf "gitdir/i:///wsl$/Ubuntu/home/stan/projects/personal/**"]
path = .gitconfig-personal
[includeIf "gitdir/i:///wsl$/Ubuntu/home/stan/projects/work/**"]
path = .gitconfig-work Both So, now every project in |
Correct.
Great!
Yes, I can see how that is confusing, especially since you think you're working in WSL, but then, you still use Git for Windows ;-) There is probably a lot of room for improvement when it comes to offering debugging capabilities in the As to this here ticket: I think it is resolved, so I will close it. |
Setup
defaults?
to the issue you're seeing?
I'm using this setup
and the config files get correctly included for projects on the C drive, but not for projects on the T drive. T is a WSL mount. Is there a known issue about WSL compat or am I just doing something wrong?
Details
PowerShell / Cmd
Minimal, Complete, and Verifiable example
this will help us understand the issue.
the correct email
no email
URL to that repository to help us with testing?
N/A
The text was updated successfully, but these errors were encountered: