summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2007-12-13 06:58:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-13 17:47:48 (GMT)
commit5ff6aae8951268d8287337b1875bccae267d2b56 (patch)
tree3ea84578a191219edff37432bb7dad7e343a3df3 /git-svn.perl
parent9e5d87d49070fe0463040e826824d6ce41beb089 (diff)
downloadgit-5ff6aae8951268d8287337b1875bccae267d2b56.zip
git-5ff6aae8951268d8287337b1875bccae267d2b56.tar.gz
git-5ff6aae8951268d8287337b1875bccae267d2b56.tar.bz2
git-svn: expand handling of From: and Signed-off-by:
The current parsing for From: and Signed-off-by: lines handles fully specified names: From: Full Name <email@address> Expand this to include the raw email addresses and straight "names": From: email@address -> email <email@address> From: Full Name -> Full Name <unknown> Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl17
1 files changed, 13 insertions, 4 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 54d7844..34c5e3d 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2363,11 +2363,20 @@ sub make_log_entry {
my ($commit_name, $commit_email) = ($name, $email);
if ($_use_log_author) {
- if ($log_entry{log} =~ /From:\s+(.*?)\s+<(.*)>\s*\n/) {
- ($name, $email) = ($1, $2);
- } elsif ($log_entry{log} =~
- /Signed-off-by:\s+(.*?)\s+<(.*)>\s*\n/) {
+ my $name_field;
+ if ($log_entry{log} =~ /From:\s+(.*\S)\s*\n/i) {
+ $name_field = $1;
+ } elsif ($log_entry{log} =~ /Signed-off-by:\s+(.*\S)\s*\n/i) {
+ $name_field = $1;
+ }
+ if (!defined $name_field) {
+ #
+ } elsif ($name_field =~ /(.*?)\s+<(.*)>/) {
($name, $email) = ($1, $2);
+ } elsif ($name_field =~ /(.*)@/) {
+ ($name, $email) = ($1, $name_field);
+ } else {
+ ($name, $email) = ($name_field, 'unknown');
}
}
if (defined $headrev && $self->use_svm_props) {