Re: t9350-fast-export.sh broken on peff/pu under Mac OS X
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Nov 11, 2012, 00:58 UTC
- Message-ID
- <CAMP44s3SSjDqA9cvG9T=-oVH0ADndbxi1MkWF6wR9gxcoCi_xg@mail.gmail.com>
- In-Reply-To
- <509EEF09.6060109@gmail.com>
On Sun, Nov 11, 2012 at 1:19 AM, Stefano Lattarini <stefano.lattarini@gmail.com> wrote:
Show 39 quoted lines
> On 11/11/2012 12:11 AM, Felipe Contreras wrote:
>> On Sat, Nov 10, 2012 at 11:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>>
>>>> On Sat, Nov 10, 2012 at 3:37 PM, Torsten Bögershausen <tboegi@web.de> wrote:
>>>>> The short version:
>>>>> echo -n doesn't seem to be portable.
>>>>> The following works for me:
>>>>
>>>> Right, I was supposed to change that to:
>>>>
>>>> true > marks-cur &&
>>>
>>> Please make it like so:
>>>
>>> >marks-cur &&
>>>
>>> No command is necessary when creating an empty file or truncating an
>>> existing file to empty, and no SP between redirection and its target.
>>
>> That hangs on zsh (presumably waiting for stdin).
>>
> Unless you set:
>
> NULLCMD=:
>
> early in your test script.
>
> Or, to be extra-safe, you could steal this initialization code from
> autoconf:
>
> # Be more Bourne compatible.
> if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
> emulate sh
> NULLCMD=:
> setopt NO_GLOB_SUBST
> # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
> # is contrary to our usage. Disable this feature.
> alias -g '${1+"$@"}'='"$@"'It doesn't seem like zsh listens to that variable in sh mode:
% zsh -c 'emulate sh; NULLCMD=foobar; > content'
And it doesn't seem like NO_GLOB_SUBST is needed any more.
I think it doesn't hurt to do 'true > marks-cur', but whatever.
Cheers.
-- Felipe Contreras