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-Status: No, score=-3.6 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,SPF_HELO_PASS, SPF_PASS 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 CBBDE1F4B4 for ; Tue, 15 Sep 2020 20:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728056AbgIOUbm (ORCPT ); Tue, 15 Sep 2020 16:31:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727979AbgIOUbM (ORCPT ); Tue, 15 Sep 2020 16:31:12 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36EC6C06174A for ; Tue, 15 Sep 2020 13:31:10 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id w1so4377357edr.3 for ; Tue, 15 Sep 2020 13:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=upkqPYCqm8CFuxhSRPKeY87qbN28IUfg4p4YT7ztYZU=; b=vatda2+gbSR9BMJgiTV7noTpkzYFNYGn34yogor/+ID5nfiLx8zqcYWsDyPqqthzLd 5+P8znKvHWIf6wHNjD8ykNtOP9ZoIA9MgcUP63dyFn/NVGkiEt51EXaUGIA6TgDhGJiZ vMtc0SDdDYacrap0cFgFNwQKTjDlwwW6plNajXBQYE5jERxzigTIJrXqZSaHg1IGN3zV 2KtL1UEmhnXyPCr8LVyj+LqzDSTnuWHUgCtaX+iiWdiS3OasaWyOJf+xYDbYV/3Fgru7 tTctXVRlrLwaDjhFXcR/7UMW+baA3LVB7Dd+hIO6bLz30jG4uhERTEleJIyM+vcbmVeb 6mBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=upkqPYCqm8CFuxhSRPKeY87qbN28IUfg4p4YT7ztYZU=; b=DNCnL/Z1cvKXYS2TmPFqY/TtCh/By09+rZMyoR1k2Jf1Y1iDDN66ak0R106SIArFto d8bJAT6nflGHn+6LyihGZEx6+idYSAwuTy/K/8hkGZsxHygR5Bl1ip8n8Srt7nTsLFbK ZOrqzhgMQK9StPzLStUpATSOufZPL7H/Cfejjk9wpHE6Id2GbbAUIRRrKAJCs32t8VwO 9U+k5i42FIZc1ZwerjeCE8+AF79DbEF4bPO4PwwFq7TYcpKYeAUj75BwAPYQIc/26dW1 VditG+li5ei3LFYpLTWaVDkC1vlIg5f2dgYIHBNpqAUEkEjfb59W4UuzItJ3oqn0ZqcR P1DA== X-Gm-Message-State: AOAM532LYfwpnZagHUgZdojax9umjaAF7LSjCiOFbLryZOm0su+gxqtb cP96adL7zwB2YqNDgCn90pA= X-Google-Smtp-Source: ABdhPJya7/ltcDZvb51suJdB6ks/hfZw5PErngBi3M28W8ZXvyOEopojzWaiPNdb8BXmD7OaFki2tA== X-Received: by 2002:a50:9fe6:: with SMTP id c93mr24238757edf.151.1600201868144; Tue, 15 Sep 2020 13:31:08 -0700 (PDT) Received: from szeder.dev (94-21-23-168.pool.digikabel.hu. [94.21.23.168]) by smtp.gmail.com with ESMTPSA id a5sm12978471edb.9.2020.09.15.13.31.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2020 13:31:07 -0700 (PDT) Date: Tue, 15 Sep 2020 22:31:05 +0200 From: SZEDER =?utf-8?B?R8OhYm9y?= To: Junio C Hamano Cc: =?utf-8?Q?J=C4=99drzej?= Dudkiewicz , Adam Dinwoodie , Git Mailing List Subject: Re: Cannot run `git submodule init` on Cygwin from script with strict error checking Message-ID: <20200915203105.GB23146@szeder.dev> References: <20200911131943.GA23146@szeder.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Sep 11, 2020 at 12:07:51PM -0700, Junio C Hamano wrote: > SZEDER Gábor writes: > > > Having said that, unlike 'git submodule', 'git-sh-setup' is meant to > > be dot-sourced into users' shell scripts, and, therefore, should work > > with the shell options set in users' scripts, including even 'set -u'. > > Is it and should it? > > git-sh-setup was meant to be an implementation detail for our own > scripts and we know don't use "-u -e". We never cared about > backward compatibility for such use by end-users when we made any > update to the git-sh-setup scriptlet. We freely changed existing > features and squatted on good names for variables and functions we > used in it, because it is designed as a private helper library. It has a manpage that it installed by 'make install-doc', and 'man git' advertises it, so I use it in most of my git-foo shell scripts, e.g. for 'require_clean_work_tree'. > Having said that, we do protect from end-user misconfiguration like > exporting CDPATH, and protecting ourselves from exporting SHELLOPTS > is not something I would oppose. > > Thanks.