Re: Problems with git-svn authors file

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nicolas Vilz <niv@...>
Cc: Junio C Hamano <junkio@...>, <git@...>
Date: Tuesday, December 12, 2006 - 12:25 am

Nicolas Vilz <niv@iaglans.de> wrote:


No, this is just a bug in git-svn.

After the following patch, you should be able to use
--------------------------------------------
(no author) = real-name <email address>
--------------------------------------------
in your authors file.

-- 
Eric Wong

From b40e14605809b0b1501002a333fbd680913f127f Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Mon, 11 Dec 2006 20:22:29 -0800
Subject: [PATCH] git-svn: correctly handle "(no author)" when using an authors file

The low-level parts of the SVN library return NULL/undef for
author-less revisions, whereas "(no author)" is a (svn) client
convention.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 1f8a3b0..17ebb77 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2948,7 +2948,8 @@ sub libsvn_log_entry {
 	my ($Y,$m,$d,$H,$M,$S) = ($date =~ /^(\d{4})\-(\d\d)\-(\d\d)T
 					 (\d\d)\:(\d\d)\:(\d\d).\d+Z$/x)
 				or die "Unable to parse date: $date\n";
-	if (defined $_authors && ! defined $users{$author}) {
+	if (defined $author && length $author > 0 &&
+	    defined $_authors && ! defined $users{$author}) {
 		die "Author: $author not defined in $_authors file\n";
 	}
 	$msg = '' if ($rev == 0 && !defined $msg);
-- 
1.4.4.2.g860f4
-
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:
Problems with git-svn authors file, Nicolas Vilz, (Sun Dec 10, 1:26 pm)
Re: Problems with git-svn authors file, Eric Wong, (Tue Dec 12, 12:25 am)
Re: Problems with git-svn authors file, Andy Parkins, (Mon Dec 11, 5:04 am)
Re: Problems with git-svn authors file, Nicolas Vilz, (Mon Dec 11, 7:44 am)