includeIf gitdir not working with UNC path

Viewed 78

I want to use another email for my git config when I work with a repository an a network share (samba).
(I know it is not best practice to use git on a share)

My .gitconfig contains this:

[includeIf "gitdir/i://server.example.com/"]
    path = .gitconfig-work
[includeIf "gitdir/i:\\\\server.example.com\\"]
    path = .gitconfig-work
[includeIf "gitdir/i:C:/Users/user1/Documents/_Work/"]
    path = .gitconfig-work

The last includeIf works as expected.
But the first two where I trigger on the UNC path do not.

I am working on Windows 10 and both tested Git Bash and PowerShell (in Windows Terminal).

Any idea what I am doing wrong?
Or are UNC paths not supported?

0 Answers
Related