Re: [updated PATCH] Same default as cvsimport when using --use-log-author

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Stephen R. van den Berg <srb@...>, <git@...>, Andy Whitcroft <apw@...>
Date: Tuesday, April 29, 2008 - 2:18 am

Junio C Hamano <gitster@pobox.com> wrote:

I don't think Stephen's patch ever gets triggered, either.

This section of code was done by Andy, so I can't tell his motivations
for using 'unknown' the way he did.

$email does appear to get set correctly for the first two elsifs cases
here in the existing code:

		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, $name_field);

So I propose the following one-line change instead of Stephen's:

diff --git a/git-svn.perl b/git-svn.perl
index b151049..301a5b4 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2432,7 +2432,7 @@ sub make_log_entry {
 		} elsif ($name_field =~ /(.*)@/) {
 			($name, $email) = ($1, $name_field);
 		} else {
-			($name, $email) = ($name_field, 'unknown');
+			($name, $email) = ($name_field, $name_field);
 		}
 	}
 	if (defined $headrev && $self->use_svm_props) {

-- 
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[updated PATCH] Same default as cvsimport when using --use-l..., Stephen R. van den Berg, (Sun Apr 27, 1:32 pm)
Re: [updated PATCH] Same default as cvsimport when using --u..., Johannes Schindelin, (Mon Apr 28, 6:15 am)
Re: [updated PATCH] Same default as cvsimport when using --u..., Eric Wong, (Tue Apr 29, 2:18 am)
Re: [updated PATCH] Same default as cvsimport when using --u..., Stephen R. van den Berg, (Tue Apr 29, 5:13 pm)
[updated2 PATCH] git-svn: Same default as cvsimport when usi..., Stephen R. van den Berg, (Tue Apr 29, 5:20 pm)