* t9350-fast-export.sh broken on peff/pu under Mac OS X
@ 2012-11-10 14:37 Torsten Bögershausen
2012-11-10 19:17 ` Felipe Contreras
0 siblings, 1 reply; 7+ messages in thread
From: Torsten Bögershausen @ 2012-11-10 14:37 UTC (permalink / raw
To: felipe.contreras, Git Mailing List; +Cc: Torsten Bögershausen
The short version:
echo -n doesn't seem to be portable.
The following works for me:
(And is this a typo: test_expect_success 'test biridectionality' ')
/Torsten
diff ../../git.peff/t/t9350-fast-export.sh t9350-fast-export.sh
444,445c444,445
< echo -n > marks-cur &&
< echo -n > marks-new &&
---
> > marks-cur &&
> > marks-new &&
464c464
< echo -n > tmp-marks &&
---
> > tmp-marks &&
474c474
< echo -n > expected &&
---
> > expected &&
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: t9350-fast-export.sh broken on peff/pu under Mac OS X
2012-11-10 14:37 t9350-fast-export.sh broken on peff/pu under Mac OS X Torsten Bögershausen
@ 2012-11-10 19:17 ` Felipe Contreras
2012-11-10 22:39 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2012-11-10 19:17 UTC (permalink / raw
To: Torsten Bögershausen; +Cc: Git Mailing List
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 &&
I don't think the code below works everywhere.
> (And is this a typo: test_expect_success 'test biridectionality' ')
Right, thanks.
> diff ../../git.peff/t/t9350-fast-export.sh t9350-fast-export.sh
Please use diff -u, I think everybody is more familiar with that.
Cheers.
--
Felipe Contreras
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: t9350-fast-export.sh broken on peff/pu under Mac OS X
2012-11-10 19:17 ` Felipe Contreras
@ 2012-11-10 22:39 ` Junio C Hamano
2012-11-10 23:11 ` Felipe Contreras
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2012-11-10 22:39 UTC (permalink / raw
To: Felipe Contreras; +Cc: Torsten Bögershausen, Git Mailing List
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: t9350-fast-export.sh broken on peff/pu under Mac OS X
2012-11-10 22:39 ` Junio C Hamano
@ 2012-11-10 23:11 ` Felipe Contreras
2012-11-11 0:19 ` Stefano Lattarini
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2012-11-10 23:11 UTC (permalink / raw
To: Junio C Hamano; +Cc: Torsten Bögershausen, Git Mailing List
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).
--
Felipe Contreras
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: t9350-fast-export.sh broken on peff/pu under Mac OS X
2012-11-10 23:11 ` Felipe Contreras
@ 2012-11-11 0:19 ` Stefano Lattarini
2012-11-11 0:58 ` Felipe Contreras
0 siblings, 1 reply; 7+ messages in thread
From: Stefano Lattarini @ 2012-11-11 0:19 UTC (permalink / raw
To: Felipe Contreras
Cc: Junio C Hamano, Torsten Bögershausen, Git Mailing List
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+"$@"}'='"$@"'
else
case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
fi
All of this untested with the real Git testsuite, of course ;-)
Regards, and HTH,
Stefano
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: t9350-fast-export.sh broken on peff/pu under Mac OS X
2012-11-11 0:19 ` Stefano Lattarini
@ 2012-11-11 0:58 ` Felipe Contreras
2012-11-11 9:32 ` Stefano Lattarini
0 siblings, 1 reply; 7+ messages in thread
From: Felipe Contreras @ 2012-11-11 0:58 UTC (permalink / raw
To: Stefano Lattarini
Cc: Junio C Hamano, Torsten Bögershausen, Git Mailing List
On Sun, Nov 11, 2012 at 1:19 AM, Stefano Lattarini
<stefano.lattarini@gmail.com> wrote:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: t9350-fast-export.sh broken on peff/pu under Mac OS X
2012-11-11 0:58 ` Felipe Contreras
@ 2012-11-11 9:32 ` Stefano Lattarini
0 siblings, 0 replies; 7+ messages in thread
From: Stefano Lattarini @ 2012-11-11 9:32 UTC (permalink / raw
To: Felipe Contreras
Cc: Junio C Hamano, Torsten Bögershausen, Git Mailing List
On 11/11/2012 01:58 AM, Felipe Contreras wrote:
>
> It doesn't seem like zsh listens to that variable in sh mode:
> $ zsh -c 'emulate sh; NULLCMD=foobar; > content'
>
Right; "emulate sh" by itself is probably enough today (autoconf, trying
to make its generated scripts extra-portable, tends to accumulate a lot
of cruft unfortunately).
Thanks,
Stefano
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-11 9:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-10 14:37 t9350-fast-export.sh broken on peff/pu under Mac OS X Torsten Bögershausen
2012-11-10 19:17 ` Felipe Contreras
2012-11-10 22:39 ` Junio C Hamano
2012-11-10 23:11 ` Felipe Contreras
2012-11-11 0:19 ` Stefano Lattarini
2012-11-11 0:58 ` Felipe Contreras
2012-11-11 9:32 ` Stefano Lattarini
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).