git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Cannot run `git submodule init` on Cygwin from script with strict error checking

From
JDJędrzej Dudkiewicz <jedrzej.dudkiewicz@gmail.com>
Date
Sep 11, 2020, 11:46 UTC
Message-ID
<CABJqhQMST-n6-uEDpFCUSsYueF_=7ZLPCtj_mQnu679oY99ZVg@mail.gmail.com>
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.
Previous: Adam DinwoodieNext: SZEDER Gábor
Message 3 of 6 in “Cannot run `git submodule init` on Cygwin from script with strict error checking”
  1. Jędrzej DudkiewiczSep 11, 2020
  2. Adam DinwoodieSep 11, 2020
  3. Jędrzej DudkiewiczSep 11, 2020
  4. SZEDER GáborSep 11, 2020
  5. Junio C HamanoSep 11, 2020
  6. SZEDER GáborSep 15, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.