# [PATCH] git-svn bug with blank commits and author file

2 messages from 2008-04-22 to 2008-04-22. Participants: Thomas Guyot-Sionnest, Eric Wong.
Thread: https://gitlist.dev/t/13211

## Thomas Guyot-Sionnest, 2008-04-22 10:07

Subject: [PATCH] git-svn bug with blank commits and author file
Message-ID: <480DB8F3.5080000@aei.ca>
URL: https://gitlist.dev/e/480DB8F3.5080000%40aei.ca

```
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* Sorry for resending; added a patch tag and corrected typo in subject *

When trying to import from svn using an author file, git-svn bails out
if it encounters a blank author. The attached patch changes this
behavior and allow using the author file with blanks authors.

I came across this bug while importing from a cvs2svn repo where the
initial revision (1) has a blank author. This doesn't break the behavior
of bailing out when an unknown author is encountered.

The patch was made against Git's HEAD.

If you reply please make sure to cc me as I'm not subscribed to the list.

Thanks,

- --
Thomas Guyot
dermoth@aei.ca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIDbjz6dZ+Kt5BchYRAjdFAJ0WA9TiIJ6tefjaPkd40Y2Tjv6NPACbBwmB
a6eFU84MpJ9MW1nErxDiqHY=
=k3jA
-----END PGP SIGNATURE-----


--- git-svn.perl.orig	2008-04-19 05:58:10.000000000 -0400
+++ git-svn.perl	2008-04-19 19:50:40.000000000 -0400
@@ -2375,8 +2375,7 @@
 	my ($author) = @_;
 	if (!defined $author || length $author == 0) {
 		$author = '(no author)';
-	}
-	if (defined $::_authors && ! defined $::users{$author}) {
+	} elsif (defined $::_authors && ! defined $::users{$author}) {
 		die "Author: $author not defined in $::_authors file\n";
 	}
 	$author;


```

## Eric Wong, 2008-04-22 23:23

Subject: Re: [PATCH] git-svn bug with blank commits and author file
Message-ID: <20080422232339.GB3532@hand.yhbt.net>
URL: https://gitlist.dev/e/20080422232339.GB3532%40hand.yhbt.net
In-Reply-To: <480DB8F3.5080000@aei.ca>

```
Thomas Guyot-Sionnest <dermoth@aei.ca> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> * Sorry for resending; added a patch tag and corrected typo in subject *
> 
> When trying to import from svn using an author file, git-svn bails out
> if it encounters a blank author. The attached patch changes this
> behavior and allow using the author file with blanks authors.
> 
> I came across this bug while importing from a cvs2svn repo where the
> initial revision (1) has a blank author. This doesn't break the behavior
> of bailing out when an unknown author is encountered.
> 
> The patch was made against Git's HEAD.
> 
> If you reply please make sure to cc me as I'm not subscribed to the list.

Thank you Thomas,

Sorry for the latency, I've been overloaded

Acked-by: Eric Wong <normalperson@yhbt.net>

> - --
> Thomas Guyot
> dermoth@aei.ca
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFIDbjz6dZ+Kt5BchYRAjdFAJ0WA9TiIJ6tefjaPkd40Y2Tjv6NPACbBwmB
> a6eFU84MpJ9MW1nErxDiqHY=
> =k3jA
> -----END PGP SIGNATURE-----

> --- git-svn.perl.orig	2008-04-19 05:58:10.000000000 -0400
> +++ git-svn.perl	2008-04-19 19:50:40.000000000 -0400
> @@ -2375,8 +2375,7 @@
>  	my ($author) = @_;
>  	if (!defined $author || length $author == 0) {
>  		$author = '(no author)';
> -	}
> -	if (defined $::_authors && ! defined $::users{$author}) {
> +	} elsif (defined $::_authors && ! defined $::users{$author}) {
>  		die "Author: $author not defined in $::_authors file\n";
>  	}
>  	$author;
> 

```
