From: Junio C Hamano <gitster@pobox.com>
To: <rsbecker@nexbridge.com>
Cc: "'brian m. carlson'" <sandals@crustytoothpaste.net>,
"'Dominik von Haller'" <vonhaller@fastec.de>,
<git@vger.kernel.org>
Subject: Re: Why does the includeif woks how it does?
Date: Mon, 19 Feb 2024 17:42:43 -0800 [thread overview]
Message-ID: <xmqqedd7ykq4.fsf@gitster.g> (raw)
In-Reply-To: <01d401da6379$635fdb30$2a1f9190$@nexbridge.com> (rsbecker@nexbridge.com's message of "Mon, 19 Feb 2024 16:19:51 -0500")
<rsbecker@nexbridge.com> writes:
> I have considered contributing an "includewhere" option that would
> do that and differentiate from "includeif". I'm not sure it is
> required, and what would happen with symbolic links.
Other potential gotchas would include how it interacts with
directory hierarchies. You may be inside a directory /a/b (where
none of /, /a, and /a/b is controlled by git) and want your "git
init" invocation to be affected by some configuration included into
your $HOME/.gitconfig via include-where mechanism. Would it work
recursively? In other words, if you had
[includeIf "gitdir:/a/b"] path = $HOME/gits/a-b-in-repo
[includeIf "cwd:/"] path = $HOME/gits/others
[includeIf "cwd:/a"] path = $HOME/gits/a
[includeIf "cwd:/a/b"] path = $HOME/gits/a-b
would all of them be included? Just the last one? Does the most
specific one win?
After your "git init" succeeds, the one specified with gitdir: would
start kicking in. Would the "cwd:" ones that are meant for cases
outside any directory under Git control be ignored then?
I am not opposed to such a feature existing at all; just pointing
out there are sources of end-user confusion we need to be careful
while we design the feature.
next prev parent reply other threads:[~2024-02-20 1:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-18 15:37 Why does the includeif woks how it does? Dominik von Haller
2024-02-19 20:10 ` brian m. carlson
2024-02-19 21:19 ` rsbecker
2024-02-20 1:42 ` Junio C Hamano [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-20 6:54 Dominik von Haller
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=xmqqedd7ykq4.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
--cc=sandals@crustytoothpaste.net \
--cc=vonhaller@fastec.de \
/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 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).