[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: <git@...>
Date: Sunday, April 27, 2008 - 1:32 pm

When using git-cvsimport, the author is inferred from the cvs commit,
e.g. cvs commit logname is foobaruser, then the author field in git
results in:

Author: foobaruser <foobaruser>

Which is not perfect, but perfectly acceptable given the circumstances.

The default git-svn import however, results in:

Author: foobaruser <foobaruser@acf43c95-373e-0410-b603-e72c3f656dc1>

When using mixes of imports, from CVS and SVN into the same git
repository, you'd like to harmonise the imports to the format cvsimport
uses.
git-svn supports an experimental option --use-log-author which currently
results in:

Author: foobaruser <unknown>

This patches harmonises the result with cvsimport, and makes
git-svn --use-log-author produce:

Author: foobaruser <foobaruser>

Signed-off-by: Stephen R. van den Berg <srb@cuci.nl>
---

 git-svn.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/git-svn.perl b/git-svn.perl
index b151049..846e739 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2434,6 +2434,9 @@ sub make_log_entry {
 		} else {
 			($name, $email) = ($name_field, 'unknown');
 		}
+	        if (!defined $email) {
+		    $email = $name;
+	        }
 	}
 	if (defined $headrev && $self->use_svm_props) {
 		if ($self->rewrite_root) {


--
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..., 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)