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
Junio C Hamano <gitster@pobox.com>
Date
Sep 11, 2020, 19:07 UTC
Message-ID
<xmqqsgbonnco.fsf@gitster.c.googlers.com>
In-Reply-To
<20200911131943.GA23146@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> 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.

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.
Previous: SZEDER GáborNext: SZEDER Gábor
Message 5 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.