Re: [PATCH] t7600: merge tag shoud create a merge commit
- From
Jeff King <peff@peff.net>
- Date
- Mar 22, 2013, 15:05 UTC
- Message-ID
- <20130322150536.GE3083@sigill.intra.peff.net>
- In-Reply-To
- <831c87ad325075b6049ef52c24477da2@meuh.org>
On Fri, Mar 22, 2013 at 03:56:15PM +0100, Yann Droneaud wrote:
Show 11 quoted lines
> Le 22.03.2013 15:48, Junio C Hamano a écrit : > >> > >>It's not in final shape: the line > >> > >> EDITOR=false test_must_fail git merge signed > > > >Because test_must_fail is a shell function, single-shot environment > >assignment like this should not be used. > > It's used throughout the test. The test 'merge --no-edit tag should > skip editor' is using it.
It's OK to do:
SINGLE_SHOT=foo some_real_command
and it's OK to do:
some_fun args
but it's not OK to do:
SINGLE_SHOT=foo some_function args
Because some POSIX shells do not create a new environment for the function (and SINGLE_SHOT will persist after the call, polluting the environment).
> Before posting my half useful test, I used "EDITOR=false > test_must_fail set" in --verbose mode to find if EDITOR was correctly > defined passed test_must_fail, and it was.
I do not think there is a shell that does not set it; it is only that some shells do not _unset_ it.
-Peff