{"thread":{"id":"48774","subject":"[PATCH] Makefile: tweak sed invocation","startedAt":"2018-06-25T19:18:47Z","lastAt":"2018-07-02T23:12:39Z","messageCount":4,"participants":["Alejandro R. Sedeño","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"350892","messageId":"1529954005-18189-1-git-send-email-asedeno@mit.edu","threadId":"48774","inReplyTo":null,"subject":"[PATCH] Makefile: tweak sed invocation","fromName":"Alejandro R. Sedeño","fromEmail":"asedeno@mit.edu","sentAt":"2018-06-25T19:13:25Z","receivedAt":"2018-06-25T19:18:47Z","isPatch":true,"sender":{"key":"asedeno@mit.edu","avatar":"https://avatars.githubusercontent.com/u/28302?v=4"},"body":"With GNU sed, the r command doesn't care if a space separates it and\nthe filename it reads from.\n\nWith SunOS sed, the space is required.\n\nSigned-off-by: Alejandro R. Sedeño <asedeno@mit.edu>\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex e4b503d..5bac181 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2109,7 +2109,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE\n \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n \tsed -e '1{' \\\n \t    -e '\ts|#!.*perl|#!$(PERL_PATH_SQ)|' \\\n-\t    -e '\trGIT-PERL-HEADER' \\\n+\t    -e '\tr GIT-PERL-HEADER' \\\n \t    -e '\tG' \\\n \t    -e '}' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n-- \n2.1.4\n\n"},{"id":"350898","messageId":"CAPig+cQxAxFUFE8j2O7iaZoAby9ioNd6Wf1OVAr5qU7kTrQOyQ@mail.gmail.com","threadId":"48774","inReplyTo":"1529954005-18189-1-git-send-email-asedeno@mit.edu","subject":"Re: [PATCH] Makefile: tweak sed invocation","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-06-25T20:15:25Z","receivedAt":"2018-06-25T20:15:43Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Jun 25, 2018 at 3:18 PM Alejandro R. Sedeño <asedeno@mit.edu> wrote:\n> With GNU sed, the r command doesn't care if a space separates it and\n> the filename it reads from.\n>\n> With SunOS sed, the space is required.\n\nMacOS and the various BSD's ship with BSD 'sed', not GNU 'sed', so it\nseemed prudent to check this change against them as well, which I did,\nand can report that it does not cause any regression on those\nplatforms.\n\nTherefore, the patch looks good. Thanks.\n\n> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>\n> ---\n> diff --git a/Makefile b/Makefile\n> @@ -2109,7 +2109,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE\n>         $(QUIET_GEN)$(RM) $@ $@+ && \\\n>         sed -e '1{' \\\n>             -e '        s|#!.*perl|#!$(PERL_PATH_SQ)|' \\\n> -           -e '        rGIT-PERL-HEADER' \\\n> +           -e '        r GIT-PERL-HEADER' \\\n>             -e '        G' \\\n>             -e '}' \\\n>             -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n"},{"id":"350899","messageId":"2b532078-dcf6-f38a-bda8-8fb1ace8306c@mit.edu","threadId":"48774","inReplyTo":"CAPig+cQxAxFUFE8j2O7iaZoAby9ioNd6Wf1OVAr5qU7kTrQOyQ@mail.gmail.com","subject":"Re: [PATCH] Makefile: tweak sed invocation","fromName":"Alejandro R. Sedeño","fromEmail":"asedeno@mit.edu","sentAt":"2018-06-25T20:27:34Z","receivedAt":"2018-06-25T20:27:41Z","isPatch":true,"sender":{"key":"asedeno@mit.edu","avatar":"https://avatars.githubusercontent.com/u/28302?v=4"},"body":"On 2018-06-25 16:15, Eric Sunshine wrote:\n> On Mon, Jun 25, 2018 at 3:18 PM Alejandro R. Sedeño <asedeno@mit.edu> wrote:\n>> With GNU sed, the r command doesn't care if a space separates it and\n>> the filename it reads from.\n>>\n>> With SunOS sed, the space is required.\n> \n> MacOS and the various BSD's ship with BSD 'sed', not GNU 'sed', so it\n> seemed prudent to check this change against them as well, which I did,\n> and can report that it does not cause any regression on those\n> platforms.\n> \n> Therefore, the patch looks good. Thanks.\n\nThanks for checking on that, Eric. I tested MacOS locally before \nsubmitting as well. From a quick skim of the POSIX sed page, the space \nis expected, so this should be portable.\n\nhttp://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html\n\n-Alejandro\n\n> \n>> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>\n>> ---\n>> diff --git a/Makefile b/Makefile\n>> @@ -2109,7 +2109,7 @@ $(SCRIPT_PERL_GEN): % : %.perl GIT-PERL-DEFINES GIT-PERL-HEADER GIT-VERSION-FILE\n>>          $(QUIET_GEN)$(RM) $@ $@+ && \\\n>>          sed -e '1{' \\\n>>              -e '        s|#!.*perl|#!$(PERL_PATH_SQ)|' \\\n>> -           -e '        rGIT-PERL-HEADER' \\\n>> +           -e '        r GIT-PERL-HEADER' \\\n>>              -e '        G' \\\n>>              -e '}' \\\n>>              -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n\n"},{"id":"351572","messageId":"491ff83e-97a6-c3f4-2d85-9c930908f6b1@mit.edu","threadId":"48774","inReplyTo":"xmqqefgtl7kq.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] Makefile: tweak sed invocation","fromName":"Alejandro R. Sedeño","fromEmail":"asedeno@mit.edu","sentAt":"2018-07-02T23:12:33Z","receivedAt":"2018-07-02T23:12:39Z","isPatch":true,"sender":{"key":"asedeno@mit.edu","avatar":"https://avatars.githubusercontent.com/u/28302?v=4"},"body":"On 2018-06-26 14:35, Junio C Hamano wrote:\n> Having said that, I'm a bit surprised that our build infrastructure\n> and shell scripts still work on tools on SunOS.  I used to have\n> access to SunOS/Solaris boxes and tried to be careful not to break\n> them unnecessarily, but these days I don't, so I expected to hear\n> quite a huge bit-rotting.\n\nI end up building new releases on SunOS all the time; when things break \nthere is usually when you hear from me. I'm hoping this patch makes it \ninto 2.18.1 so I don't have to apply it during my build process.\n\n-Alejandro\n"}]}