{"thread":{"id":"24303","subject":"[PATCH 2/5] simplify control flow in cvs pserver auth","startedAt":"2010-07-06T17:35:45Z","lastAt":"2010-07-06T17:35:45Z","messageCount":1,"participants":["Áshin László"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"144927","messageId":"AANLkTil27QbVl_Li1P2C53SUBZYYtwrWXYdOeZN5FVHl@mail.gmail.com","threadId":"24303","inReplyTo":"2703392615631579763@unknownmsgid","subject":"[PATCH 2/5] simplify control flow in cvs pserver auth","fromName":"Áshin László","fromEmail":"ashinlaszlo@gmail.com","sentAt":"2010-07-06T17:35:45Z","receivedAt":"2010-07-06T17:35:45Z","isPatch":true,"sender":{"key":"ashinlaszlo@gmail.com","avatar":null},"body":"---\n git-cvsserver.perl |   16 +++++++---------\n 1 files changed, 7 insertions(+), 9 deletions(-)\n\ndiff --git a/git-cvsserver.perl b/git-cvsserver.perl\nindex c89d999..10dcc65 100755\n--- a/git-cvsserver.perl\n+++ b/git-cvsserver.perl\n@@ -231,18 +231,12 @@ if ($state->{method} eq 'pserver') {\n        }\n\n        # Fall through to LOVE\n-    } else {\n-        # Trying to authenticate a user\n-        if (not exists $cfg->{gitcvs}->{authdb}) {\n-            print \"E the repo config file needs a [gitcvs] section\nwith an 'authdb' parameter set to the filename of the authentication\ndatabase\\n\";\n-            print \"I HATE YOU\\n\";\n-            exit 1;\n-        }\n-\n+    } elsif (exists $cfg->{gitcvs}->{authdb}) {\n        my $authdb = $cfg->{gitcvs}->{authdb};\n\n        unless (-e $authdb) {\n-            print \"E The authentication database specified in\n[gitcvs.authdb] does not exist\\n\";\n+            print \"E The authentication database specified in \" .\n+                \"[gitcvs.authdb] does not exist\\n\";\n            print \"I HATE YOU\\n\";\n            exit 1;\n        }\n@@ -264,6 +258,10 @@ if ($state->{method} eq 'pserver') {\n        }\n\n        # Fall through to LOVE\n+    } else {\n+        print \"E Unable to find a usable authentication method\\n\";\n+        print \"I HATE YOU\\n\";\n+        exit 1;\n    }\n\n    # For checking whether the user is anonymous on commit\n--\n1.7.0.4\n"}]}