Re: [PATCH v2] config: introduce an Operating System-specific `includeIf` condition
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- Nov 23, 2022, 11:54 UTC
- Message-ID
- <Y34KBTx+gQB13GRv@danh.dev>
- In-Reply-To
- <Y3wKe7aO7I7bpmLm@coredump.intra.peff.net>
On 2022-11-21 18:32:11-0500, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> On Mon, Nov 21, 2022 at 07:19:48PM +0000, Johannes Schindelin via GitGitGadget wrote: > > > It is relatively common for users to maintain identical `~/.gitconfig` > > files across all of their setups, using the `includeIf` construct > > liberally to adjust the settings to the respective setup as needed. > > This seems like a reasonable thing to have in general, but I wonder if > you have an example of how people use this. Mostly I am wondering: > > - is it sometimes a misuse, where users _think_ that the OS is > correlated with some feature of Git. And they would be better off > with some flag like "does the current platform support fsmonitor".
A possible use-case is setting credential.helper based on OS, let's say libsecret on Linux, and osxkeychain on macOS. Of course, users can have their own helper on specific OS.
Show 6 quoted lines
> > - for cases where it really is "uname -s" the best differentiator? Or > would they commonly want to lump FreeBSD and Linux into the same > category, or to tell the difference between Debian versus Fedora? > > -Peff
-- Danh