Re: [PATCH v2] config: introduce an Operating System-specific `includeIf` condition
- From
Jeff King <peff@peff.net>
- Date
- Nov 24, 2022, 00:56 UTC
- Message-ID
- <Y37BU6UA4plxNJCf@coredump.intra.peff.net>
- In-Reply-To
- <Y34KBTx+gQB13GRv@danh.dev>
On Wed, Nov 23, 2022 at 06:54:45PM +0700, Đoàn Trần Công Danh wrote:
Show 10 quoted lines
> > 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.
Thanks, that's a very nice concrete example. I agree that's a pretty reasonable use of this feature, given the lack of other selection mechanisms. I do wonder if folks might run into annoyances when they want to use libsecret on Linux _and_ FreeBSD or similar. But this feature is definitely better than the status quo, and is not very much code to implement or support.
-Peff