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

Re: [PATCH] t/t5560: use `X=Y && export X' not `export X=Y'

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 7, 2010, 08:09 UTC
Message-ID
<AANLkTi=cMYoLVipaiFajcssrRBVPX5NXFNwj21Ji3Lru@mail.gmail.com>
In-Reply-To
<vpqhbgy8mjj.fsf@bauges.imag.fr>
On Thu, Oct 7, 2010 at 07:55, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 11 quoted lines
> Ęvar Arnfjörš Bjarmason <avarab@gmail.com> writes:
>
>> Change t/t5560-http-backend-noserver.sh to use the `X=Y && export X'
>> style instead of `export X=Y'. The latter doesn't work on all POSIX
>> shells.
>
> According to
>
> git grep '\<export [A-Za-z_]*='
>
> there seem to be a couple of other instances of this.

Yeah, the ones in Documentation/*.txt are OK IMO. The users reading the docs probably don't have a shell old enough to complain about this.

Likewise for contrib/hg-to-git/hg-to-git.py and gitweb/INSTALL.
These we probably want to fix:
    git-am.sh:          export GIT_MERGE_VERBOSITY=0
    git-rebase.sh:          export GIT_MERGE_VERBOSITY=1
    git-stash.sh:           export GIT_MERGE_VERBOSITY=0
and maybe this:
    git-gui/lib/shortcut.tcl:                               puts $fd
"export PATH=[sq [file dirname $::_git]]:\$PATH &&"
This is the only other thing in the test suite:
    t/t1509-root-worktree.sh:export GIT_DIR="$TRASH_DIRECTORY/.git"
    t/t1509-root-worktree.sh:export GIT_WORK_TREE=/
    t/t1509-root-worktree.sh:export GIT_DIR="$(echo
$TRASH_DIRECTORY|sed 's,^/,,')/.git"

But I didn't touch that since nobody runs that test anyway, and if they do having a strict POSIX shell is the least of their problems.

Previous: Matthieu MoyNext: Clemens Buchacher
Message 3 of 5 in “t/t5560: use `X=Y && export X' not `export X=Y'”
  1. t/t5560: use `X=Y && export X' not `export X=Y'Ævar Arnfjörð Bjarmason, Oct 7, 2010
  2. Matthieu MoyOct 7, 2010
  3. Ævar Arnfjörð BjarmasonOct 7, 2010
  4. Clemens BuchacherOct 10, 2010
  5. Junio C HamanoOct 13, 2010

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.