Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-06 Thread Junio C Hamano
Stephen Boyd bebar...@gmail.com writes: I see Stephen who wrote the original Thunderbird save-as is already on the Cc list. How about doing it this way instead? It was so long ago I can't even remember writing that patch. But I googled the thread from 4.5 years ago and I see that you

Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-06 Thread Torsten Bögershausen
On 2014-09-06 09.34, Junio C Hamano wrote: Stephen Boyd bebar...@gmail.com writes: I see Stephen who wrote the original Thunderbird save-as is already on the Cc list. How about doing it this way instead? It was so long ago I can't even remember writing that patch. But I googled the thread

[RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-05 Thread Chris Packham
In check_patch_format we feed $1 to a block that attempts to determine the patch format. Since we've already redirected $1 to stdin there is no need to redirect it again when we invoke tr. This prevents the following errors when invoking git am $ git am patch.patch tr: write error: Broken

Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-05 Thread Johannes Sixt
Am 05.09.2014 12:06, schrieb Chris Packham: In check_patch_format we feed $1 to a block that attempts to determine the patch format. Since we've already redirected $1 to stdin there is no need to redirect it again when we invoke tr. This prevents the following errors when invoking git am

Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-05 Thread Chris Packham
On Sat, Sep 6, 2014 at 8:26 AM, Johannes Sixt j...@kdbg.org wrote: Am 05.09.2014 12:06, schrieb Chris Packham: In check_patch_format we feed $1 to a block that attempts to determine the patch format. Since we've already redirected $1 to stdin there is no need to redirect it again when we

Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-05 Thread Junio C Hamano
Chris Packham judge.pack...@gmail.com writes: On Sat, Sep 6, 2014 at 8:26 AM, Johannes Sixt j...@kdbg.org wrote: Am 05.09.2014 12:06, schrieb Chris Packham: In check_patch_format we feed $1 to a block that attempts to determine the patch format. Since we've already redirected $1 to stdin

Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-05 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Also, - tr -d '\015' $1 | sed -n -e '/^$/q' -e '/^[ ]/d' -e p | sane_egrep -v '^[!-9;-~]+:' /dev/null || patch_format=mbox as the tr is at an upsteam of

Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-05 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Redoing what e3f67d30 (am: fix patch format detection for Thunderbird Save As emails, 2010-01-25) tried to do without wasting a fork and a pipe may be a workable improvement. I see Stephen who wrote the original Thunderbird save-as is already on the

Re: [RFC PATCHv3 1/4] am: avoid re-directing stdin twice

2014-09-05 Thread Stephen Boyd
(replying from webmail interface) On Fri, Sep 5, 2014 at 3:25 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Redoing what e3f67d30 (am: fix patch format detection for Thunderbird Save As emails, 2010-01-25) tried to do without wasting a fork and a pipe