{"thread":{"id":"36751","subject":"[PATCH] t9138-git-svn-authors-prog.sh fixups","startedAt":"2014-05-25T19:24:54Z","lastAt":"2014-05-27T19:53:11Z","messageCount":3,"participants":["Jeremiah Mahler","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"242665","messageId":"1401045894-22711-1-git-send-email-jmmahler@gmail.com","threadId":"36751","inReplyTo":null,"subject":"[PATCH] t9138-git-svn-authors-prog.sh fixups","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-25T19:24:54Z","receivedAt":"2014-05-25T19:24:54Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"Several fixups of the t9138-git-svn-authors-prog.sh test script to\nfollow current recommendations in t/README.\n\n  - Fixed a Perl script with a full \"#!/usr/bin/perl\" shebang\n    to use write_script() and $PERL_PATH as per t/README.\n\n  - Placed svn-authors data setup inside a test_expect_success.\n\n  - Fixed trailing quotes to use the same indentation throughout.\n\nSigned-off-by: Jeremiah Mahler <jmmahler@gmail.com>\n---\n t/t9138-git-svn-authors-prog.sh | 35 +++++++++++++++++------------------\n 1 file changed, 17 insertions(+), 18 deletions(-)\n\ndiff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138-git-svn-authors-prog.sh\nindex 83cc5fc..d54c37a 100755\n--- a/t/t9138-git-svn-authors-prog.sh\n+++ b/t/t9138-git-svn-authors-prog.sh\n@@ -7,40 +7,39 @@ test_description='git svn authors prog tests'\n \n . ./lib-git-svn.sh\n \n-cat > svn-authors-prog <<'EOF'\n-#!/usr/bin/perl\n-$_ = shift;\n-if (s/-sub$//)  {\n-\tprint \"$_ <$_\\@sub.example.com>\\n\";\n-}\n-else {\n-\tprint \"$_ <$_\\@example.com>\\n\";\n-}\n+write_script svn-authors-prog $PERL_PATH <<-\\EOF\n+\t$_ = shift;\n+\tif (s/-sub$//)  {\n+\t\tprint \"$_ <$_\\@sub.example.com>\\n\";\n+\t} else {\n+\t\tprint \"$_ <$_\\@example.com>\\n\";\n+\t}\n EOF\n-chmod +x svn-authors-prog\n \n-cat > svn-authors <<'EOF'\n-ff = FFFFFFF FFFFFFF <fFf@other.example.com>\n-EOF\n+test_expect_success 'svn-authors setup' '\n+\tcat >svn-authors <<-\\EOF\n+\tff = FFFFFFF FFFFFFF <fFf@other.example.com>\n+\tEOF\n+'\n \n test_expect_success 'setup svnrepo' '\n \tfor i in aa bb cc-sub dd-sub ee-foo ff\n \tdo\n \t\tsvn mkdir -m $i --username $i \"$svnrepo\"/$i\n \tdone\n-\t'\n+'\n \n test_expect_success 'import authors with prog and file' '\n \tgit svn clone --authors-prog=./svn-authors-prog \\\n \t    --authors-file=svn-authors \"$svnrepo\" x\n-\t'\n+'\n \n test_expect_success 'imported 6 revisions successfully' '\n \t(\n \t\tcd x\n \t\ttest \"`git rev-list refs/remotes/git-svn | wc -l`\" -eq 6\n \t)\n-\t'\n+'\n \n test_expect_success 'authors-prog ran correctly' '\n \t(\n@@ -56,7 +55,7 @@ test_expect_success 'authors-prog ran correctly' '\n \t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn~5 | \\\n \t\t  grep \"^author aa <aa@example\\.com> \"\n \t)\n-\t'\n+'\n \n test_expect_success 'authors-file overrode authors-prog' '\n \t(\n@@ -64,7 +63,7 @@ test_expect_success 'authors-file overrode authors-prog' '\n \t\tgit rev-list -1 --pretty=raw refs/remotes/git-svn | \\\n \t\t  grep \"^author FFFFFFF FFFFFFF <fFf@other\\.example\\.com> \"\n \t)\n-\t'\n+'\n \n git --git-dir=x/.git config --unset svn.authorsfile\n git --git-dir=x/.git config --unset svn.authorsprog\n-- \n2.0.0.rc4.1.g4a28f16.dirty\n"},{"id":"242771","messageId":"xmqq8upnf1o5.fsf@gitster.dls.corp.google.com","threadId":"36751","inReplyTo":"1401045894-22711-1-git-send-email-jmmahler@gmail.com","subject":"Re: [PATCH] t9138-git-svn-authors-prog.sh fixups","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-05-27T19:43:06Z","receivedAt":"2014-05-27T19:43:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremiah Mahler <jmmahler@gmail.com> writes:\n\n> Several fixups of the t9138-git-svn-authors-prog.sh test script to\n> follow current recommendations in t/README.\n>\n>   - Fixed a Perl script with a full \"#!/usr/bin/perl\" shebang\n>     to use write_script() and $PERL_PATH as per t/README.\n>\n>   - Placed svn-authors data setup inside a test_expect_success.\n>\n>   - Fixed trailing quotes to use the same indentation throughout.\n>\n> Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>\n> ---\n>  t/t9138-git-svn-authors-prog.sh | 35 +++++++++++++++++------------------\n>  1 file changed, 17 insertions(+), 18 deletions(-)\n>\n> diff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138-git-svn-authors-prog.sh\n> index 83cc5fc..d54c37a 100755\n> --- a/t/t9138-git-svn-authors-prog.sh\n> +++ b/t/t9138-git-svn-authors-prog.sh\n> @@ -7,40 +7,39 @@ test_description='git svn authors prog tests'\n>  \n>  . ./lib-git-svn.sh\n>  \n> -cat > svn-authors-prog <<'EOF'\n> -#!/usr/bin/perl\n> -$_ = shift;\n> -if (s/-sub$//)  {\n> -\tprint \"$_ <$_\\@sub.example.com>\\n\";\n> -}\n> -else {\n> -\tprint \"$_ <$_\\@example.com>\\n\";\n> -}\n> +write_script svn-authors-prog $PERL_PATH <<-\\EOF\n\nI think you meant to dq \"$PERL_PATH\" here.  Other than that, looks\nOK to me.\n\nThanks.\n"},{"id":"242773","messageId":"20140527195311.GA20054@hudson.localdomain","threadId":"36751","inReplyTo":"xmqq8upnf1o5.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] t9138-git-svn-authors-prog.sh fixups","fromName":"Jeremiah Mahler","fromEmail":"jmmahler@gmail.com","sentAt":"2014-05-27T19:53:11Z","receivedAt":"2014-05-27T19:53:11Z","isPatch":true,"sender":{"key":"jmmahler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/154028?v=4"},"body":"Junio,\n\nOn Tue, May 27, 2014 at 12:43:06PM -0700, Junio C Hamano wrote:\n> Jeremiah Mahler <jmmahler@gmail.com> writes:\n> \n...\n> > diff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138-git-svn-authors-prog.sh\n> > index 83cc5fc..d54c37a 100755\n> > --- a/t/t9138-git-svn-authors-prog.sh\n> > +++ b/t/t9138-git-svn-authors-prog.sh\n> > @@ -7,40 +7,39 @@ test_description='git svn authors prog tests'\n> >  \n> >  . ./lib-git-svn.sh\n> >  \n> > -cat > svn-authors-prog <<'EOF'\n> > -#!/usr/bin/perl\n> > -$_ = shift;\n> > -if (s/-sub$//)  {\n> > -\tprint \"$_ <$_\\@sub.example.com>\\n\";\n> > -}\n> > -else {\n> > -\tprint \"$_ <$_\\@example.com>\\n\";\n> > -}\n> > +write_script svn-authors-prog $PERL_PATH <<-\\EOF\n> \n> I think you meant to dq \"$PERL_PATH\" here.  Other than that, looks\n> OK to me.\n> \n> Thanks.\n\nAh, you're right, it needs the quotes.  Can this minor changed be fixed\nby editing the patch or should I re-send it?\n\n-- \nJeremiah Mahler\njmmahler@gmail.com\nhttp://github.com/jmahler\n"}]}