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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 842CA1F852 for ; Fri, 28 Jan 2022 19:37:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348029AbiA1Th2 (ORCPT ); Fri, 28 Jan 2022 14:37:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344219AbiA1Th0 (ORCPT ); Fri, 28 Jan 2022 14:37:26 -0500 Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64DB0C061714 for ; Fri, 28 Jan 2022 11:37:25 -0800 (PST) Received: by mail-qk1-x72c.google.com with SMTP id w8so6500744qkw.8 for ; Fri, 28 Jan 2022 11:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=MohTi/7T09DB5Bmr3VAx/lb1eypVgsTde2V5BCKt4Tg=; b=o1DSESlTugFLm0rYyr3LAtMdZ36O7E/xNDiywydoUh8H5bC//WNSrQ57tjNULaNj56 1/JZpiMvS2Ma3L8e0O1THKJr0bc4zNVzGHrpB0BjVZEpa1H6up53oxdygFoVZ0Q64sGe +F9XajtxktiOEfHtS77RWQeB4HWM9FQFHYWXOEqbn73qeRUkBTWRXpCsfsBHHu37ljUz eIXf+40S71fRxOMS7uJEDpLF+qoqj454oBjxZV6N6LeSjbBlrwTuwfh0j7Mkn4oGZsof qegmbbTiTHodvSwnFanlCCXcLqxjVXmKfA9o9Gn4bMhiPSg2/vzBfs0ZloXsziO6IyXE r85Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=MohTi/7T09DB5Bmr3VAx/lb1eypVgsTde2V5BCKt4Tg=; b=s+f5rw9b2r9wQaKtoueJkxAAK/m4UCCkKmprNb66jbBBijVrrs1MtxNdY36AubEVw7 GnDJ+en4OXmLt/uabQMGkjQV562rIfEYD9oss2nLmai+QKCwyNDDOpjSIY/1+RbxlfcQ eC4eLlj7Wq5w4b+NJOb+yOtN6cVhSqMyuK1fLd99FTkW6ju8cLVyqsX3RorkQTaacBPJ 65XO7u2TjV7ilyCcfPS/jSS8F7h6wTWUz1Hjt3atWpc49FQDpAmaChf0BJ15TNpos2BU 8uRfKS1xPkc2y/3S5EDmX8grpOJ5Y3bhQDkRQKWHxxtUFy7EIqFtOuCCQqIshDcbZ/Eq dX/w== X-Gm-Message-State: AOAM531fSvwLinO4cwIphA1y0EUN4JSIJCCCaDZXR9Abj/b1hkX+VLr1 4gJDj0QqSxBuwnjYASXuLbI= X-Google-Smtp-Source: ABdhPJxplUnonGdYVdo0Yj7S0UUzJCoFmyghVBw/qJCqMcCRNKjWnnMVYjufSg+SrYs8ZNvrUlWXsw== X-Received: by 2002:a37:a2cb:: with SMTP id l194mr6686783qke.531.1643398644123; Fri, 28 Jan 2022 11:37:24 -0800 (PST) Received: from ?IPV6:2600:1700:e72:80a0:5cd8:5d5f:ba81:6c67? ([2600:1700:e72:80a0:5cd8:5d5f:ba81:6c67]) by smtp.gmail.com with ESMTPSA id w5sm3964795qko.34.2022.01.28.11.37.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jan 2022 11:37:23 -0800 (PST) Message-ID: <5283a1b2-a31f-1657-1a67-cab6d9fec0ac@gmail.com> Date: Fri, 28 Jan 2022 14:37:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] scalar: accept -C and -c options before the subcommand Content-Language: en-US To: Johannes Schindelin Cc: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Johannes Schindelin via GitGitGadget , git@vger.kernel.org, Taylor Blau References: <220127.86v8y5dgus.gmgdl@evledraar.gmail.com> <0f8d5d04-e86c-48e2-fea0-32c25c3f9325@gmail.com> From: Derrick Stolee In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 1/28/2022 6:27 AM, Johannes Schindelin wrote: > Hi Stolee, > > On Thu, 27 Jan 2022, Derrick Stolee wrote: > >> The biggest benefits of using handle_options() is for other pre-command >> options such as --exec-path, which I use on a regular basis when testing >> new functionality. >> >> There are other options in handle_options() that might not be >> appropriate, or might be incorrect if we just make handle_options() >> non-static. For example, `scalar --list-cmds=parseopt` wouldn't show the >> scalar commands and would instead show the git commands. > > Right, and since `handle_options()` lives in the same file as `git`'s > `cmd_main()` function, we would not only have to disentangle options that > work only for `git` from those that would also work for `scalar`, but we > would have to extract the `handle_options()` function into a separate > file. I agree that these would be necessary steps. > But since I had a look at `handle_options()` anyway, I might just as well > summarize my insights about how applicable the supported options are for > `scalar` here: > > # Beneficial > > -c = > --config-env = > -C > > Since I added support for these (except for the long form > `--config-env` that I actually only learned while researching this > email), it is obvious that I'd like `scalar` to support them. > > # Won't hurt These "Won't hurt" items look to me as "they probably don't matter, but it would be nice if "scalar