Subject: Re: [PATCH v2] config: introduce an Operating System-specific `includeIf` condition

From: Đoàn Trần Công Danh <[email-masked]>
Date: Wed, 23 Nov 2022 18:54:45 +0700

On 2022-11-21 18:32:11-0500, Jeff King <[email-masked]> wrote:
> 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.

> 
>   - 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