{"thread":{"id":"8748","subject":"[PATCH] Avoid perl in t1300-repo-config","startedAt":"2007-06-27T12:45:40Z","lastAt":"2007-06-28T14:19:51Z","messageCount":9,"participants":["Alex Riesen","Frank Lichtenheld","Junio C Hamano","Jakub Narebski","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"45907","messageId":"81b0412b0706270545w65ca2556yaafaac6ff31b5961@mail.gmail.com","threadId":"8748","inReplyTo":null,"subject":"[PATCH] Avoid perl in t1300-repo-config","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-27T12:45:40Z","receivedAt":"2007-06-27T12:45:40Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"It fixes the test on system where ActiveState Perl is used.\nIt is also shorter.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n t/t1300-repo-config.sh |   12 ++++++------\n 1 files changed, 6 insertions(+), 6 deletions(-)\n\n\nFrom e844edbdc63150386dc4eb2c2080ece4f371cd04 Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Wed, 27 Jun 2007 14:40:41 +0200\nSubject: [PATCH] Avoid perl in t1300-repo-config\n\nIt fixes the test on system where ActiveState Perl is used.\nIt is shorter as a bonus.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n t/t1300-repo-config.sh |   12 ++++++------\n 1 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 7a77bef..60b0dc5 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -530,24 +530,24 @@ EOF\n \n cat > expect <<\\EOF\n Key: section.sub=section.val1\n-Value: foo=bar\n+foo=bar\n Key: section.sub=section.val2\n-Value: foo\n+foo\n bar\n Key: section.sub=section.val3\n-Value: \n+\n \n \n Key: section.sub=section.val4\n-Value: \n+\n Key: section.sub=section.val5\n EOF\n \n-git config --null --list | perl -0ne 'chop;($key,$value)=split(/\\n/,$_,2);print \"Key: $key\\n\";print \"Value: $value\\n\" if defined($value)' > result\n+git config --null --list | xargs -n1 -0 echo 'Key:' > result\n \n test_expect_success '--null --list' 'cmp result expect'\n \n-git config --null --get-regexp 'val[0-9]' | perl -0ne 'chop;($key,$value)=split(/\\n/,$_,2);print \"Key: $key\\n\";print \"Value: $value\\n\" if defined($value)' > result\n+git config --null --get-regexp 'val[0-9]' | xargs -n1 -0 echo 'Key:' > result\n \n test_expect_success '--null --get-regexp' 'cmp result expect'\n \n-- \n1.5.2.2.1308.g540b6\n\n"},{"id":"45922","messageId":"20070627151545.GF12721@planck.djpig.de","threadId":"8748","inReplyTo":"81b0412b0706270545w65ca2556yaafaac6ff31b5961@mail.gmail.com","subject":"Re: [PATCH] Avoid perl in t1300-repo-config","fromName":"Frank Lichtenheld","fromEmail":"frank@lichtenheld.de","sentAt":"2007-06-27T15:15:46Z","receivedAt":"2007-06-27T15:15:46Z","isPatch":true,"sender":{"key":"frank@lichtenheld.de","avatar":"https://gravatar.com/avatar/b9f1d4b120e138f157c9e480d0818197c474628923786adb98f30017cdb99c3c?d=mp&s=160"},"body":"On Wed, Jun 27, 2007 at 02:45:40PM +0200, Alex Riesen wrote:\n> It fixes the test on system where ActiveState Perl is used.\n> It is also shorter.\n\nThanks :)\n\nFor future reference: What in my code broke with ActiveState Perl?\nThe command line options?\n\nGruesse,\n-- \nFrank Lichtenheld <frank@lichtenheld.de>\nwww: http://www.djpig.de/\n"},{"id":"45924","messageId":"81b0412b0706270847j1bfc8a68ge6213643f02391ec@mail.gmail.com","threadId":"8748","inReplyTo":"20070627151545.GF12721@planck.djpig.de","subject":"Re: [PATCH] Avoid perl in t1300-repo-config","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-27T15:47:55Z","receivedAt":"2007-06-27T15:47:55Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 6/27/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:\n> On Wed, Jun 27, 2007 at 02:45:40PM +0200, Alex Riesen wrote:\n> > It fixes the test on system where ActiveState Perl is used.\n> > It is also shorter.\n>\n> Thanks :)\n>\n> For future reference: What in my code broke with ActiveState Perl?\n> The command line options?\n>\n\nNothing really, the code is perfect and options are correct.\nActiveState is just clueless, and activates \\r\\n line endings\non stdout/stderr by default, unless the stream is binmoded\n(irrespective of whether the stream is tty or not).\n"},{"id":"45952","messageId":"7vmyykog4e.fsf@assigned-by-dhcp.pobox.com","threadId":"8748","inReplyTo":"81b0412b0706270545w65ca2556yaafaac6ff31b5961@mail.gmail.com","subject":"Re: [PATCH] Avoid perl in t1300-repo-config","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-28T04:30:25Z","receivedAt":"2007-06-28T04:30:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Alex Riesen\" <raa.lkml@gmail.com> writes:\n\n> It fixes the test on system where ActiveState Perl is used.\n> It is also shorter.\n> ...\n> -git config --null --list | perl -0ne 'chop;($key,$value)=split(/\\n/,$_,2);print \"Key: $key\\n\";print \"Value: $value\\n\" if defined($value)' > result\n> +git config --null --list | xargs -n1 -0 echo 'Key:' > result\n\nThis now makes us rely on \"xargs -0\", which is probably much\nless portable than Perl isn't it?  Because the point of the test\nis that it can show things in NUL terminated format, I'd rather\nkeep it use a bit more portable stuff.  Also I am not sure if\nthe two tests are really testing the same thing.\n\nMaybe postprocess \"git config -z\" output with \"tr '[\\000]' 'Q'\"\nor something so that the comparison of the result does not have\nto worry about NULs?  I dunno.\n\nBy the way, is it possible for gmail users to avoid attachments\nwhen sending patches in?\n"},{"id":"45958","messageId":"81b0412b0706280041i535efdf0r87e552551b796044@mail.gmail.com","threadId":"8748","inReplyTo":"7vmyykog4e.fsf@assigned-by-dhcp.pobox.com","subject":"Re: [PATCH] Avoid perl in t1300-repo-config","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-28T07:41:43Z","receivedAt":"2007-06-28T07:41:43Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 6/28/07, Junio C Hamano <gitster@pobox.com> wrote:\n> \"Alex Riesen\" <raa.lkml@gmail.com> writes:\n>\n> > It fixes the test on system where ActiveState Perl is used.\n> > It is also shorter.\n> > ...\n> > -git config --null --list | perl -0ne 'chop;($key,$value)=...\n> > +git config --null --list | xargs -n1 -0 echo 'Key:' > result\n>\n> This now makes us rely on \"xargs -0\", which is probably much\n> less portable than Perl isn't it?\n\nDunno. Have yet too meet a system where it doesn't work.\nThat said, SUSv6 does not mention it.\n\n> Maybe postprocess \"git config -z\" output with \"tr '[\\000]' 'Q'\"\n> or something so that the comparison of the result does not have\n> to worry about NULs?  I dunno.\n\nWill try that.\n\n> By the way, is it possible for gmail users to avoid attachments\n> when sending patches in?\n\nNo. The message text is unpredictably garbled\n"},{"id":"45962","messageId":"81b0412b0706280156q56944862s94644917b95e892f@mail.gmail.com","threadId":"8748","inReplyTo":"81b0412b0706280041i535efdf0r87e552551b796044@mail.gmail.com","subject":"[PATCH] Avoid perl in t1300-repo-config","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-28T08:56:53Z","receivedAt":"2007-06-28T08:56:53Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"It fixes the test on systems where ActiveState Perl is used.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n t/t1300-repo-config.sh |   22 ++++++++++------------\n 1 files changed, 10 insertions(+), 12 deletions(-)\n\nOn 6/28/07, Alex Riesen <raa.lkml@gmail.com> wrote:\n> On 6/28/07, Junio C Hamano <gitster@pobox.com> wrote:\n> > \"Alex Riesen\" <raa.lkml@gmail.com> writes:\n> >\n> > > It fixes the test on system where ActiveState Perl is used.\n> > > It is also shorter.\n> > > ...\n> > > -git config --null --list | perl -0ne 'chop;($key,$value)=...\n> > > +git config --null --list | xargs -n1 -0 echo 'Key:' > result\n> >\n> > This now makes us rely on \"xargs -0\", which is probably much\n> > less portable than Perl isn't it?\n>\n> Dunno. Have yet too meet a system where it doesn't work.\n> That said, SUSv6 does not mention it.\n>\n> > Maybe postprocess \"git config -z\" output with \"tr '[\\000]' 'Q'\"\n> > or something so that the comparison of the result does not have\n> > to worry about NULs?  I dunno.\n>\n> Will try that.\n>\n\nSo I did. Any idea as to how make the here-document\n_without_ the trailing LF?\n\n\nFrom 846fcfe47938ee894eb433b6f3a24ae4b6479e5b Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Wed, 27 Jun 2007 14:40:41 +0200\nSubject: [PATCH] Avoid perl in t1300-repo-config\n\nIt fixes the test on system where ActiveState Perl is used.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n t/t1300-repo-config.sh |   22 ++++++++++------------\n 1 files changed, 10 insertions(+), 12 deletions(-)\n\ndiff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh\nindex 7a77bef..27486de 100755\n--- a/t/t1300-repo-config.sh\n+++ b/t/t1300-repo-config.sh\n@@ -529,25 +529,23 @@ cat > .git/config <<\\EOF\n EOF\n \n cat > expect <<\\EOF\n-Key: section.sub=section.val1\n-Value: foo=bar\n-Key: section.sub=section.val2\n-Value: foo\n-bar\n-Key: section.sub=section.val3\n-Value: \n+section.sub=section.val1\n+foo=barQsection.sub=section.val2\n+foo\n+barQsection.sub=section.val3\n \n \n-Key: section.sub=section.val4\n-Value: \n-Key: section.sub=section.val5\n+Qsection.sub=section.val4\n+Qsection.sub=section.val5Q\n EOF\n \n-git config --null --list | perl -0ne 'chop;($key,$value)=split(/\\n/,$_,2);print \"Key: $key\\n\";print \"Value: $value\\n\" if defined($value)' > result\n+git config --null --list | tr '[\\000]' 'Q' > result\n+echo >>result\n \n test_expect_success '--null --list' 'cmp result expect'\n \n-git config --null --get-regexp 'val[0-9]' | perl -0ne 'chop;($key,$value)=split(/\\n/,$_,2);print \"Key: $key\\n\";print \"Value: $value\\n\" if defined($value)' > result\n+git config --null --get-regexp 'val[0-9]' | tr '[\\000]' 'Q' > result\n+echo >>result\n \n test_expect_success '--null --get-regexp' 'cmp result expect'\n \n-- \n1.5.2.2.1308.g540b6\n\n"},{"id":"45963","messageId":"f5vuv9$f8s$1@sea.gmane.org","threadId":"8748","inReplyTo":"81b0412b0706280041i535efdf0r87e552551b796044@mail.gmail.com","subject":"Re: [PATCH] Avoid perl in t1300-repo-config","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-06-28T09:28:09Z","receivedAt":"2007-06-28T09:28:09Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Alex Riesen wrote:\n\n>> By the way, is it possible for gmail users to avoid attachments\n>> when sending patches in?\n> \n> No. The message text is unpredictably garbled\n\nIf by \"gmail users\" you mean gmail web interface, then probably no.\nNo problems with using gmail from email client or from git-send-email\n(the latter after configuring sendmail in my case).\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"45968","messageId":"81b0412b0706280400u5c234fb6hd72a431f57ec8975@mail.gmail.com","threadId":"8748","inReplyTo":"f5vuv9$f8s$1@sea.gmane.org","subject":"Re: [PATCH] Avoid perl in t1300-repo-config","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-28T11:00:26Z","receivedAt":"2007-06-28T11:00:26Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 6/28/07, Jakub Narebski <jnareb@gmail.com> wrote:\n> >> By the way, is it possible for gmail users to avoid attachments\n> >> when sending patches in?\n> >\n> > No. The message text is unpredictably garbled\n>\n> If by \"gmail users\" you mean gmail web interface, then probably no.\n> No problems with using gmail from email client or from git-send-email\n> (the latter after configuring sendmail in my case).\n\nCan't. M$ Exchange plagued\n"},{"id":"45981","messageId":"Pine.LNX.4.64.0706281412190.4438@racer.site","threadId":"8748","inReplyTo":"81b0412b0706280041i535efdf0r87e552551b796044@mail.gmail.com","subject":"Re: [PATCH] Avoid perl in t1300-repo-config","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-06-28T14:19:51Z","receivedAt":"2007-06-28T14:19:51Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 28 Jun 2007, Alex Riesen wrote:\n\n> On 6/28/07, Junio C Hamano <gitster@pobox.com> wrote:\n> \n> > By the way, is it possible for gmail users to avoid attachments when \n> > sending patches in?\n> \n> No. The message text is unpredictably garbled\n\nIt is not really unpredictable.\n\n- whitespace at the end of line is stripped\n- too long lines are _always_ broken (and our diffstat lines qualify for \n  that)\n- empty lines at the end of the message are stripped (does not concern us)\n- empty lines at the beginning of the message are stripped (does not \n  concern us either)\n- encodings different from UTF-8 are a problem\n\nOf course, the first reason already precludes diffs from being sent. Just \nthink of an empty line, which is in both versions (or even worse, a single \nspace on the line).\n\nCiao,\nDscho\n"}]}