{"thread":{"id":"11271","subject":"git-svn: expand handling of From: and Signed-off-by:","startedAt":"2007-12-13T06:58:15Z","lastAt":"2007-12-14T08:21:24Z","messageCount":3,"participants":["Andy Whitcroft","Eric Wong","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"62985","messageId":"20071213065815.GH30608@shadowen.org","threadId":"11271","inReplyTo":null,"subject":"git-svn: expand handling of From: and Signed-off-by:","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2007-12-13T06:58:15Z","receivedAt":"2007-12-13T06:58:15Z","isPatch":false,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"The current parsing for From: and Signed-off-by: lines handles fully\nspecified names:\n\n\tFrom: Full Name <email@address>\n\nExpand this to include the raw email addresses and straight \"names\":\n\n\tFrom: email@address       -> email <email@address>\n\tFrom: Full Name           -> Full Name <unknown>\n\nSigned-off-by: Andy Whitcroft <apw@shadowen.org>\n---\n git-svn.perl |   17 +++++++++++++----\n 1 files changed, 13 insertions(+), 4 deletions(-)\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 54d7844..058f8e9 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2363,11 +2363,20 @@ sub make_log_entry {\n \n \tmy ($commit_name, $commit_email) = ($name, $email);\n \tif ($_use_log_author) {\n-\t\tif ($log_entry{log} =~ /From:\\s+(.*?)\\s+<(.*)>\\s*\\n/) {\n-\t\t\t($name, $email) = ($1, $2);\n-\t\t} elsif ($log_entry{log} =~\n-\t\t                      /Signed-off-by:\\s+(.*?)\\s+<(.*)>\\s*\\n/) {\n+\t\tmy $name_field;\n+\t\tif ($log_entry{log} =~ /From:\\s+(.*\\S)\\s*\\n/i) {\n+\t\t\t$name_field = $1;\n+\t\t} elsif ($log_entry{log} =~ /Signed-off-by:\\s+(.*\\S)\\s*\\n/i) {\n+\t\t\t$name_field = $1;\n+\t\t}\n+\t\tif (!defined $name_field) {\n+\t\t\t#\n+\t\t} elsif ($name_field =~ /(.*?)\\s+<(.*)>/) {\n \t\t\t($name, $email) = ($1, $2);\n+        \t} elsif ($name_field =~ /(.*)@/) {\n+\t\t\t($name, $email) = ($1, $name_field);\n+\t\t} else {\n+\t\t\t($name, $email) = ($name_field, 'unknown');\n \t\t}\n \t}\n \tif (defined $headrev && $self->use_svm_props) {\n"},{"id":"63034","messageId":"20071213163253.GC18433@soma","threadId":"11271","inReplyTo":"20071213065815.GH30608@shadowen.org","subject":"Re: git-svn: expand handling of From: and Signed-off-by:","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-12-13T16:32:53Z","receivedAt":"2007-12-13T16:32:53Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Andy Whitcroft <apw@shadowen.org> wrote:\n> The current parsing for From: and Signed-off-by: lines handles fully\n> specified names:\n> \n> \tFrom: Full Name <email@address>\n> \n> Expand this to include the raw email addresses and straight \"names\":\n> \n> \tFrom: email@address       -> email <email@address>\n> \tFrom: Full Name           -> Full Name <unknown>\n> \n> Signed-off-by: Andy Whitcroft <apw@shadowen.org>\n\nSome minor whitespace damage (which Junio can fix up), but\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\nThanks Andy.\n\n> ---\n>  git-svn.perl |   17 +++++++++++++----\n>  1 files changed, 13 insertions(+), 4 deletions(-)\n> diff --git a/git-svn.perl b/git-svn.perl\n> index 54d7844..058f8e9 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -2363,11 +2363,20 @@ sub make_log_entry {\n>  \n>  \tmy ($commit_name, $commit_email) = ($name, $email);\n>  \tif ($_use_log_author) {\n> -\t\tif ($log_entry{log} =~ /From:\\s+(.*?)\\s+<(.*)>\\s*\\n/) {\n> -\t\t\t($name, $email) = ($1, $2);\n> -\t\t} elsif ($log_entry{log} =~\n> -\t\t                      /Signed-off-by:\\s+(.*?)\\s+<(.*)>\\s*\\n/) {\n> +\t\tmy $name_field;\n> +\t\tif ($log_entry{log} =~ /From:\\s+(.*\\S)\\s*\\n/i) {\n> +\t\t\t$name_field = $1;\n> +\t\t} elsif ($log_entry{log} =~ /Signed-off-by:\\s+(.*\\S)\\s*\\n/i) {\n> +\t\t\t$name_field = $1;\n> +\t\t}\n> +\t\tif (!defined $name_field) {\n> +\t\t\t#\n> +\t\t} elsif ($name_field =~ /(.*?)\\s+<(.*)>/) {\n>  \t\t\t($name, $email) = ($1, $2);\n> +        \t} elsif ($name_field =~ /(.*)@/) {\n    ^ spaces before tab here\n\n> +\t\t\t($name, $email) = ($1, $name_field);\n> +\t\t} else {\n> +\t\t\t($name, $email) = ($name_field, 'unknown');\n>  \t\t}\n>  \t}\n>  \tif (defined $headrev && $self->use_svm_props) {\n\n-- \nEric Wong\n"},{"id":"63123","messageId":"7vd4t9u1ob.fsf@gitster.siamese.dyndns.org","threadId":"11271","inReplyTo":"20071213163253.GC18433@soma","subject":"Re: git-svn: expand handling of From: and Signed-off-by:","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-14T08:21:24Z","receivedAt":"2007-12-14T08:21:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Some minor whitespace damage (which Junio can fix up), but\n> Acked-by: Eric Wong <normalperson@yhbt.net>\n>\n> Thanks Andy.\n\nThanks, applied.\n"}]}