git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [updated PATCH] Same default as cvsimport when using --use-log-author
@ 2008-04-27 17:32 Stephen R. van den Berg
  2008-04-27 20:47 ` Junio C Hamano
  2008-04-28 10:15 ` [updated PATCH] " Johannes Schindelin
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen R. van den Berg @ 2008-04-27 17:32 UTC (permalink / raw)
  To: git

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) {

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-05-01  3:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27 17:32 [updated PATCH] Same default as cvsimport when using --use-log-author Stephen R. van den Berg
2008-04-27 20:47 ` Junio C Hamano
2008-04-29  6:18   ` Eric Wong
2008-04-29  9:52     ` Andy Whitcroft
2008-04-29 21:13     ` Stephen R. van den Berg
2008-04-29 21:20       ` [updated2 PATCH] git-svn: " Stephen R. van den Berg
2008-05-01  3:47         ` Eric Wong
2008-04-28 10:15 ` [updated PATCH] " Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).