git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jędrzej Dudkiewicz" <jedrzej.dudkiewicz@gmail.com>
To: Adam Dinwoodie <adam@dinwoodie.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Cannot run `git submodule init` on Cygwin from script with strict error checking
Date: Fri, 11 Sep 2020 13:46:43 +0200	[thread overview]
Message-ID: <CABJqhQMST-n6-uEDpFCUSsYueF_=7ZLPCtj_mQnu679oY99ZVg@mail.gmail.com> (raw)
In-Reply-To: <CA+kUOan0N32W22xkoYsGYqM7rJDnc=tjQe_2Hnh2H47=19bbeQ@mail.gmail.com>

On Fri, Sep 11, 2020 at 1:30 PM Adam Dinwoodie <adam@dinwoodie.org> wrote:
>
> Hi Jędrzej,

> I think there's something odd about the way you're calling `git
> submodule init`: it should normally be a separate execution that
> wouldn't inherit the `-aeu` or `-x` settings from the parent Bash
> process.

Sorry for not including the test script. Here it is:

----8<----8<----8<-- CUT HERE--8<----8<----8<----8<----
#!/bin/bash

set -aeu

export SHELLOPTS

set -x

git submodule init
----8<----8<----8<-- CUT HERE--8<----8<----8<----8<----

I use "export SHELLOPTS" because I want these flags to be effective in
subshells. As a workaround I'm currently calling "set +u" before each
execution of "git submodule init" and my script works, but it isn't
very nice and IMHO shouldn't be required (i.e. it would be extremely
nice if someone fixed it).
-- 
Jędrzej Dudkiewicz

I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.

  reply	other threads:[~2020-09-11 11:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11  8:20 Cannot run `git submodule init` on Cygwin from script with strict error checking Jędrzej Dudkiewicz
2020-09-11 11:30 ` Adam Dinwoodie
2020-09-11 11:46   ` Jędrzej Dudkiewicz [this message]
2020-09-11 13:19     ` SZEDER Gábor
2020-09-11 19:07       ` Junio C Hamano
2020-09-15 20:31         ` SZEDER Gábor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABJqhQMST-n6-uEDpFCUSsYueF_=7ZLPCtj_mQnu679oY99ZVg@mail.gmail.com' \
    --to=jedrzej.dudkiewicz@gmail.com \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).