* includeIf ignores subdirectories (possible bug)
@ 2020-06-14 15:43 Helmut K. C. Tessarek
0 siblings, 0 replies; only message in thread
From: Helmut K. C. Tessarek @ 2020-06-14 15:43 UTC (permalink / raw)
To: git
[-- Attachment #1.1: Type: text/plain, Size: 1404 bytes --]
I've noticed a strange behavior, which might be a bug.
When I'm in a subdirectory of a repo, the IncludeIf is ignored, which makes
certain tasks only possible in the root directory of the repo. e.g. commit
Here's a minimal config:
.gitconfig:
[includeIf "gitdir:~/projects/personal/"]
path = .gitconfig-personal
[includeIf "gitdir:~/projects/work/"]
path = .gitconfig-work
[commit]
gpgsign = true
.gitconfig-personal:
[user]
name = Helmut K. C. Tessarek
email = personal@email.com
signingkey = xxxxxxx1
.gitconfig-work:
[user]
name = K. C. Tessarek
email = work@email.com
signingkey = xxxxxxx2
Ok, now create a repo in ~/projects/personal/test/
then add a directory to that repo and commit
cd ~/projects/personal/test/
mkdir new-dir
git add .
git commit -m "new dir"
# committed with the correct user name and email, and signed with the correct key
cd new-dir
touch file
git add .
git commit -m "new file"
# error: name and email are empty, key is empty to
Run:
git config -l --show-origin
No entries for name, email, signingkey
Cheers,
K. C.
--
regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944
Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
/*
Thou shalt not follow the NULL pointer for chaos and madness
await thee at its end.
*/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-14 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 15:43 includeIf ignores subdirectories (possible bug) Helmut K. C. Tessarek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).