{"thread":{"id":"13211","subject":"[PATCH] git-svn bug with blank commits and author file","startedAt":"2008-04-22T10:07:47Z","lastAt":"2008-04-22T23:23:39Z","messageCount":2,"participants":["Thomas Guyot-Sionnest","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"74939","messageId":"480DB8F3.5080000@aei.ca","threadId":"13211","inReplyTo":null,"subject":"[PATCH] git-svn bug with blank commits and author file","fromName":"Thomas Guyot-Sionnest","fromEmail":"dermoth@aei.ca","sentAt":"2008-04-22T10:07:47Z","receivedAt":"2008-04-22T10:07:47Z","isPatch":true,"sender":{"key":"dermoth@aei.ca","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n* Sorry for resending; added a patch tag and corrected typo in subject *\n\nWhen trying to import from svn using an author file, git-svn bails out\nif it encounters a blank author. The attached patch changes this\nbehavior and allow using the author file with blanks authors.\n\nI came across this bug while importing from a cvs2svn repo where the\ninitial revision (1) has a blank author. This doesn't break the behavior\nof bailing out when an unknown author is encountered.\n\nThe patch was made against Git's HEAD.\n\nIf you reply please make sure to cc me as I'm not subscribed to the list.\n\nThanks,\n\n- --\nThomas Guyot\ndermoth@aei.ca\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.6 (GNU/Linux)\nComment: Using GnuPG with Mozilla - http://enigmail.mozdev.org\n\niD8DBQFIDbjz6dZ+Kt5BchYRAjdFAJ0WA9TiIJ6tefjaPkd40Y2Tjv6NPACbBwmB\na6eFU84MpJ9MW1nErxDiqHY=\n=k3jA\n-----END PGP SIGNATURE-----\n\n\n--- git-svn.perl.orig\t2008-04-19 05:58:10.000000000 -0400\n+++ git-svn.perl\t2008-04-19 19:50:40.000000000 -0400\n@@ -2375,8 +2375,7 @@\n \tmy ($author) = @_;\n \tif (!defined $author || length $author == 0) {\n \t\t$author = '(no author)';\n-\t}\n-\tif (defined $::_authors && ! defined $::users{$author}) {\n+\t} elsif (defined $::_authors && ! defined $::users{$author}) {\n \t\tdie \"Author: $author not defined in $::_authors file\\n\";\n \t}\n \t$author;\n\n"},{"id":"75018","messageId":"20080422232339.GB3532@hand.yhbt.net","threadId":"13211","inReplyTo":"480DB8F3.5080000@aei.ca","subject":"Re: [PATCH] git-svn bug with blank commits and author file","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-04-22T23:23:39Z","receivedAt":"2008-04-22T23:23:39Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Thomas Guyot-Sionnest <dermoth@aei.ca> wrote:\n> -----BEGIN PGP SIGNED MESSAGE-----\n> Hash: SHA1\n> \n> * Sorry for resending; added a patch tag and corrected typo in subject *\n> \n> When trying to import from svn using an author file, git-svn bails out\n> if it encounters a blank author. The attached patch changes this\n> behavior and allow using the author file with blanks authors.\n> \n> I came across this bug while importing from a cvs2svn repo where the\n> initial revision (1) has a blank author. This doesn't break the behavior\n> of bailing out when an unknown author is encountered.\n> \n> The patch was made against Git's HEAD.\n> \n> If you reply please make sure to cc me as I'm not subscribed to the list.\n\nThank you Thomas,\n\nSorry for the latency, I've been overloaded\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> - --\n> Thomas Guyot\n> dermoth@aei.ca\n> -----BEGIN PGP SIGNATURE-----\n> Version: GnuPG v1.4.6 (GNU/Linux)\n> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org\n> \n> iD8DBQFIDbjz6dZ+Kt5BchYRAjdFAJ0WA9TiIJ6tefjaPkd40Y2Tjv6NPACbBwmB\n> a6eFU84MpJ9MW1nErxDiqHY=\n> =k3jA\n> -----END PGP SIGNATURE-----\n\n> --- git-svn.perl.orig\t2008-04-19 05:58:10.000000000 -0400\n> +++ git-svn.perl\t2008-04-19 19:50:40.000000000 -0400\n> @@ -2375,8 +2375,7 @@\n>  \tmy ($author) = @_;\n>  \tif (!defined $author || length $author == 0) {\n>  \t\t$author = '(no author)';\n> -\t}\n> -\tif (defined $::_authors && ! defined $::users{$author}) {\n> +\t} elsif (defined $::_authors && ! defined $::users{$author}) {\n>  \t\tdie \"Author: $author not defined in $::_authors file\\n\";\n>  \t}\n>  \t$author;\n> \n"}]}