From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 3A8B81F910 for ; Thu, 24 Nov 2022 00:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbiKXA5D (ORCPT ); Wed, 23 Nov 2022 19:57:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbiKXA4y (ORCPT ); Wed, 23 Nov 2022 19:56:54 -0500 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E9FA12D19 for ; Wed, 23 Nov 2022 16:56:53 -0800 (PST) Received: (qmail 24280 invoked by uid 109); 24 Nov 2022 00:56:53 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Thu, 24 Nov 2022 00:56:53 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 21404 invoked by uid 111); 24 Nov 2022 00:56:53 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 23 Nov 2022 19:56:53 -0500 Authentication-Results: peff.net; auth=none Date: Wed, 23 Nov 2022 19:56:51 -0500 From: Jeff King To: =?utf-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZw==?= Danh Cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org, =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Phillip Wood , Johannes Schindelin Subject: Re: [PATCH v2] config: introduce an Operating System-specific `includeIf` condition Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Nov 23, 2022 at 06:54:45PM +0700, Đoàn Trần Công Danh wrote: > > 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