Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Git integration does not correctly support `includeIf` directive #40354
Steps to Reproduce:
Reproduces without extensions: Yes
This is NOT a Please tell me who you are issue as indicated by #36368. This feature works as expected with the git cli and well as Visual Studio Team Explorer where it was fixed in issue Team Explorer does not recognize git includeIf directive
It sure seems to be so... This is what git returns:
changed the title from
git integration does not correct support includeIf directive
Git integration does not correctly support `includeIf` directive
Dec 20, 2017
This issue also effects me and I am using includeif in my global gitconfig.
@motowilliams I can't seem to reproduce this on macOS: I removed the
is this a Windows specific issue? I'll try testing on Windows and Linux.
Edit: I can reproduce the issue on Windows 10 (1803) and Git for Windows 2.17. I have not tested on Linux. This may be a Windows specific issue.
@motowilliams I figured out the issue and have devised a workaround: VS Code passes a lowercase drive letter when launching Git, which somehow breaks the includeIf checking logic.
Thus, just use
which enables case insensitive compare. This fixes the issue; I was able to commit successfully (Windows 10 1803, Git for Windows 2.17, Version 1.24.0-insider Commit a521c01 Date 2018-05-21T05:18:01.058Z)
I'm not sure whether the lowercase drive letter is coming from. I'll have to see how Git is launched on Windows.
How I found this:
I wrapped Git with a Batch file to see what was passed into Git:
And set git.path in VSCode to use this executable. I tried to commit from VSCode, which failed to pick up the includeIf config. Then I ran the wrapper from the command line, and it did pick up the includeIf. I then checked the log:
Note the difference in the case letter.
added a commit
May 24, 2018
referenced this issue
May 24, 2018
Guys, I can't even get this working on my Windows machine, independent of VS Code. Here's my setup:
What am I doing wrong?
Thanks @zhuowei, that was it.
I really do think