From: Johannes Sixt <j6t@kdbg.org>
To: Pete Wyckoff <pw@padd.com>
Cc: git@vger.kernel.org, Vitor Antunes <vitor.hda@gmail.com>
Subject: Re: [PATCH 2/2] git-p4: remove bash-ism in t9800
Date: Sun, 26 Feb 2012 18:48:07 +0100 [thread overview]
Message-ID: <4F4A7057.2020309@kdbg.org> (raw)
In-Reply-To: <1330270647-8817-3-git-send-email-pw@padd.com>
Am 26.02.2012 16:37, schrieb Pete Wyckoff:
> - P4EDITOR=touch P4USER=bob P4PASSWD=secret test_must_fail "$GITP4" commit --preserve-user &&
> - test_must_fail git diff --exit-code HEAD..p4/master
> + # dashism: test_must_fail does not propagate variables
> + P4EDITOR=touch P4USER=bob P4PASSWD=secret &&
> + export P4EDITOR P4USER P4PASSWD &&
> + test_must_fail "$GITP4" commit --preserve-user &&
> + ! git diff --exit-code HEAD..p4/master
It is a bashism that variables assigned in front of a shell function are
exported. But it is not a dashism that they are not exported; that
(surprising?) behavior is actually conforming to POSIX.
With the new code, be aware that the variables remain exported, which
might affect subsequent tests in general, though not this one, because
the assignments are in a sub-shell:
> )
> '
-- Hannes
next prev parent reply other threads:[~2012-02-26 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-26 15:37 [PATCH 0/2] git-p4: remove test bash-isms Pete Wyckoff
2012-02-26 15:37 ` [PATCH 1/2] git-p4: remove bash-ism in t9809 Pete Wyckoff
2012-02-26 15:37 ` [PATCH 2/2] git-p4: remove bash-ism in t9800 Pete Wyckoff
2012-02-26 17:48 ` Johannes Sixt [this message]
2012-02-26 18:16 ` Pete Wyckoff
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F4A7057.2020309@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=pw@padd.com \
--cc=vitor.hda@gmail.com \
/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.
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 NNTP newsgroup(s).