{"thread":{"id":"53677","subject":"includeIf ignores subdirectories (possible bug)","startedAt":"2020-06-14T16:33:15Z","lastAt":"2020-06-14T16:33:15Z","messageCount":1,"participants":["Helmut K. C. Tessarek"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"399713","messageId":"7aabac4a-ef75-74bd-01d9-5c6de27f9338@evermeet.cx","threadId":"53677","inReplyTo":null,"subject":"includeIf ignores subdirectories (possible bug)","fromName":"Helmut K. C. Tessarek","fromEmail":"tessarek@evermeet.cx","sentAt":"2020-06-14T15:43:39Z","receivedAt":"2020-06-14T16:33:15Z","isPatch":false,"sender":{"key":"tessarek@evermeet.cx","avatar":null},"body":"I've noticed a strange behavior, which might be a bug.\n\nWhen I'm in a subdirectory of a repo, the IncludeIf is ignored, which makes\ncertain tasks only possible in the root directory of the repo. e.g. commit\n\nHere's a minimal config:\n\n.gitconfig:\n\n[includeIf \"gitdir:~/projects/personal/\"]\n    path = .gitconfig-personal\n[includeIf \"gitdir:~/projects/work/\"]\n    path = .gitconfig-work\n[commit]\n    gpgsign = true\n\n.gitconfig-personal:\n\n[user]\n    name = Helmut K. C. Tessarek\n    email = personal@email.com\n    signingkey = xxxxxxx1\n\n.gitconfig-work:\n\n[user]\n    name = K. C. Tessarek\n    email = work@email.com\n    signingkey = xxxxxxx2\n\nOk, now create a repo in ~/projects/personal/test/\n\nthen add a directory to that repo and commit\n\ncd ~/projects/personal/test/\nmkdir new-dir\ngit add .\ngit commit -m \"new dir\"\n\n# committed with the correct user name and email, and signed with the correct key\n\ncd new-dir\ntouch file\ngit add .\ngit commit -m \"new file\"\n\n# error: name and email are empty, key is empty to\n\nRun:\n\ngit config -l --show-origin\n\nNo entries for name, email, signingkey\n\nCheers,\n  K. C.\n\n-- \nregards Helmut K. C. Tessarek              KeyID 0x172380A011EF4944\nKey fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944\n\n/*\n   Thou shalt not follow the NULL pointer for chaos and madness\n   await thee at its end.\n*/\n\n"}]}