{"thread":{"id":"32055","subject":"t9350-fast-export.sh broken on peff/pu under Mac OS X","startedAt":"2012-11-10T14:37:36Z","lastAt":"2012-11-11T09:32:53Z","messageCount":7,"participants":["Torsten Bögershausen","Felipe Contreras","Junio C Hamano","Stefano Lattarini"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202753","messageId":"509E66B0.3040308@web.de","threadId":"32055","inReplyTo":null,"subject":"t9350-fast-export.sh broken on peff/pu under Mac OS X","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-11-10T14:37:36Z","receivedAt":"2012-11-10T14:37:36Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"The short version:\necho -n doesn't seem to be portable.\nThe following works for me:\n\n(And is this a typo: test_expect_success 'test biridectionality' ')\n\n/Torsten\n\n\n\n diff ../../git.peff/t/t9350-fast-export.sh t9350-fast-export.sh\n444,445c444,445\n<       echo -n > marks-cur &&\n<       echo -n > marks-new &&\n---\n>       > marks-cur &&\n>       > marks-new &&\n464c464\n<       echo -n > tmp-marks &&\n---\n>       > tmp-marks &&\n474c474\n<       echo -n > expected &&\n---\n>       > expected &&\n"},{"id":"202773","messageId":"CAMP44s2sKL4CJ_wcM7U9mYPX6bkaQA8hgDM6Z0QEj2TACh-8DQ@mail.gmail.com","threadId":"32055","inReplyTo":"509E66B0.3040308@web.de","subject":"Re: t9350-fast-export.sh broken on peff/pu under Mac OS X","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-10T19:17:30Z","receivedAt":"2012-11-10T19:17:30Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sat, Nov 10, 2012 at 3:37 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n> The short version:\n> echo -n doesn't seem to be portable.\n> The following works for me:\n\nRight, I was supposed to change that to:\n\n  true > marks-cur &&\n\nI don't think the code below works everywhere.\n\n> (And is this a typo: test_expect_success 'test biridectionality' ')\n\nRight, thanks.\n\n>  diff ../../git.peff/t/t9350-fast-export.sh t9350-fast-export.sh\n\nPlease use diff -u, I think everybody is more familiar with that.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"202788","messageId":"7v4nkxozep.fsf@alter.siamese.dyndns.org","threadId":"32055","inReplyTo":"CAMP44s2sKL4CJ_wcM7U9mYPX6bkaQA8hgDM6Z0QEj2TACh-8DQ@mail.gmail.com","subject":"Re: t9350-fast-export.sh broken on peff/pu under Mac OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-11-10T22:39:58Z","receivedAt":"2012-11-10T22:39:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> On Sat, Nov 10, 2012 at 3:37 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n>> The short version:\n>> echo -n doesn't seem to be portable.\n>> The following works for me:\n>\n> Right, I was supposed to change that to:\n>\n>   true > marks-cur &&\n\nPlease make it like so:\n\n\t>marks-cur &&\n\nNo command is necessary when creating an empty file or truncating an\nexisting file to empty, and no SP between redirection and its target.\n"},{"id":"202789","messageId":"CAMP44s0dQ8EeCkHo8Lh3odG3qQoeLFModec+7doLeTHnZoJ_pg@mail.gmail.com","threadId":"32055","inReplyTo":"7v4nkxozep.fsf@alter.siamese.dyndns.org","subject":"Re: t9350-fast-export.sh broken on peff/pu under Mac OS X","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-10T23:11:50Z","receivedAt":"2012-11-10T23:11:50Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sat, Nov 10, 2012 at 11:39 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>\n>> On Sat, Nov 10, 2012 at 3:37 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n>>> The short version:\n>>> echo -n doesn't seem to be portable.\n>>> The following works for me:\n>>\n>> Right, I was supposed to change that to:\n>>\n>>   true > marks-cur &&\n>\n> Please make it like so:\n>\n>         >marks-cur &&\n>\n> No command is necessary when creating an empty file or truncating an\n> existing file to empty, and no SP between redirection and its target.\n\nThat hangs on zsh (presumably waiting for stdin).\n\n-- \nFelipe Contreras\n"},{"id":"202793","messageId":"509EEF09.6060109@gmail.com","threadId":"32055","inReplyTo":"CAMP44s0dQ8EeCkHo8Lh3odG3qQoeLFModec+7doLeTHnZoJ_pg@mail.gmail.com","subject":"Re: t9350-fast-export.sh broken on peff/pu under Mac OS X","fromName":"Stefano Lattarini","fromEmail":"stefano.lattarini@gmail.com","sentAt":"2012-11-11T00:19:21Z","receivedAt":"2012-11-11T00:19:21Z","isPatch":false,"sender":{"key":"stefano.lattarini@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1429199?v=4"},"body":"On 11/11/2012 12:11 AM, Felipe Contreras wrote:\n> On Sat, Nov 10, 2012 at 11:39 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>>\n>>> On Sat, Nov 10, 2012 at 3:37 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n>>>> The short version:\n>>>> echo -n doesn't seem to be portable.\n>>>> The following works for me:\n>>>\n>>> Right, I was supposed to change that to:\n>>>\n>>>   true > marks-cur &&\n>>\n>> Please make it like so:\n>>\n>>         >marks-cur &&\n>>\n>> No command is necessary when creating an empty file or truncating an\n>> existing file to empty, and no SP between redirection and its target.\n> \n> That hangs on zsh (presumably waiting for stdin).\n>\nUnless you set:\n\n    NULLCMD=:\n\nearly in your test script.\n\nOr, to be extra-safe, you could steal this initialization code from\nautoconf:\n\n    # Be more Bourne compatible.\n    if test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n      emulate sh\n      NULLCMD=:\n      setopt NO_GLOB_SUBST\n      # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n      # is contrary to our usage.  Disable this feature.\n      alias -g '${1+\"$@\"}'='\"$@\"'\n    else\n      case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac\n    fi\n\nAll of this untested with the real Git testsuite, of course ;-)\n\nRegards, and HTH,\n  Stefano\n"},{"id":"202795","messageId":"CAMP44s3SSjDqA9cvG9T=-oVH0ADndbxi1MkWF6wR9gxcoCi_xg@mail.gmail.com","threadId":"32055","inReplyTo":"509EEF09.6060109@gmail.com","subject":"Re: t9350-fast-export.sh broken on peff/pu under Mac OS X","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-11T00:58:33Z","receivedAt":"2012-11-11T00:58:33Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Nov 11, 2012 at 1:19 AM, Stefano Lattarini\n<stefano.lattarini@gmail.com> wrote:\n> On 11/11/2012 12:11 AM, Felipe Contreras wrote:\n>> On Sat, Nov 10, 2012 at 11:39 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> Felipe Contreras <felipe.contreras@gmail.com> writes:\n>>>\n>>>> On Sat, Nov 10, 2012 at 3:37 PM, Torsten Bögershausen <tboegi@web.de> wrote:\n>>>>> The short version:\n>>>>> echo -n doesn't seem to be portable.\n>>>>> The following works for me:\n>>>>\n>>>> Right, I was supposed to change that to:\n>>>>\n>>>>   true > marks-cur &&\n>>>\n>>> Please make it like so:\n>>>\n>>>         >marks-cur &&\n>>>\n>>> No command is necessary when creating an empty file or truncating an\n>>> existing file to empty, and no SP between redirection and its target.\n>>\n>> That hangs on zsh (presumably waiting for stdin).\n>>\n> Unless you set:\n>\n>     NULLCMD=:\n>\n> early in your test script.\n>\n> Or, to be extra-safe, you could steal this initialization code from\n> autoconf:\n>\n>     # Be more Bourne compatible.\n>     if test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then\n>       emulate sh\n>       NULLCMD=:\n>       setopt NO_GLOB_SUBST\n>       # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n>       # is contrary to our usage.  Disable this feature.\n>       alias -g '${1+\"$@\"}'='\"$@\"'\n\nIt doesn't seem like zsh listens to that variable in sh mode:\n\n% zsh -c 'emulate sh; NULLCMD=foobar; > content'\n\nAnd it doesn't seem like NO_GLOB_SUBST is needed any more.\n\nI think it doesn't hurt to do 'true > marks-cur', but whatever.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"202804","messageId":"509F70C5.4080405@gmail.com","threadId":"32055","inReplyTo":"CAMP44s3SSjDqA9cvG9T=-oVH0ADndbxi1MkWF6wR9gxcoCi_xg@mail.gmail.com","subject":"Re: t9350-fast-export.sh broken on peff/pu under Mac OS X","fromName":"Stefano Lattarini","fromEmail":"stefano.lattarini@gmail.com","sentAt":"2012-11-11T09:32:53Z","receivedAt":"2012-11-11T09:32:53Z","isPatch":false,"sender":{"key":"stefano.lattarini@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1429199?v=4"},"body":"On 11/11/2012 01:58 AM, Felipe Contreras wrote:\n>\n> It doesn't seem like zsh listens to that variable in sh mode:\n>   $ zsh -c 'emulate sh; NULLCMD=foobar; > content'\n>\nRight; \"emulate sh\" by itself is probably enough today (autoconf, trying\nto make its generated scripts extra-portable, tends to accumulate a lot\nof cruft unfortunately).\n\nThanks,\n  Stefano\n"}]}