From: Matthias Beyer <mail@beyermatthias.de>
To: git@vger.kernel.org
Subject: Bug with git-config includeIf
Date: Tue, 11 Apr 2023 18:05:18 +0200 [thread overview]
Message-ID: <3352350.44csPzL39Z@takeshi> (raw)
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
Hi,
please keep me in CC when replying, I am not subscribed.
I experience the following (seemingly) bug in my git setup:
I have three files for my git configuration:
* ~/.gitconfig -> ~/config/git/gitconfig
* ~/config/git/gitconfig_private
* ~/config/git/gitconfig_work
The gitconfig_private sets my email address to this very email address, the
gitconfig_work sets it to me work email address.
The gitconfig file has a `includeIf` directive:
```
[include]
path = ~/config/git/gitconfig_private
[includeIf "gitdir:~/dev/work/"]
path = ~/config/git/gitconfig_work
```
That means, from my understanding, that all git repositories in ~/dev/work
should now have the work-related email address set.
If I go to ~/dev/work/somerepo and `git config --get user.email` it indeed
shows the expected email address.
But if I go to a subdirectory in that repository, the very same command shows
the private email address, and commits get written with that private email
address.
Did I miss something obvious or did I discover a bug?
git: 2.38.4
Best,
Matthias
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2023-04-11 16:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 16:05 Matthias Beyer [this message]
2023-04-11 16:58 ` Bug with git-config includeIf Junio C Hamano
2023-04-12 6:26 ` Matthias Beyer
2023-04-11 17:00 ` Emily Shaffer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3352350.44csPzL39Z@takeshi \
--to=mail@beyermatthias.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.