git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 2/4] git-cvsserver: simplify control flow in pserver  authentication
       [not found] <1707116361121042582@unknownmsgid>
@ 2010-07-03 21:22 ` Áshin László
  2010-07-03 22:16   ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 2+ messages in thread
From: Áshin László @ 2010-07-03 21:22 UTC (permalink / raw)
  To: git

 git-cvsserver.perl |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 9664e86..46e5fdb 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -225,18 +225,12 @@ if ($state->{method} eq 'pserver') {
        }

        # Fall through to LOVE
-    } else {
-        # Trying to authenticate a user
-        if (not exists $cfg->{gitcvs}->{authdb}) {
-            print "E the repo config file needs a [gitcvs] section
with an 'authdb' parameter set to the filename of the authentication
database\n";
-            print "I HATE YOU\n";
-            exit 1;
-        }
-
+    } elsif (exists $cfg->{gitcvs}->{authdb}) {
        my $authdb = $cfg->{gitcvs}->{authdb};

        unless (-e $authdb) {
-            print "E The authentication database specified in
[gitcvs.authdb] does not exist\n";
+            print "E The authentication database specified in ";
+            print "[gitcvs.authdb] does not exist\n";
            print "I HATE YOU\n";
            exit 1;
        }
@@ -258,6 +252,10 @@ if ($state->{method} eq 'pserver') {
        }

        # Fall through to LOVE
+    } else {
+        print "E Unable to find usable authentication method\n";
+        print "I HATE YOU\n";
+        exit 1;
    }

    # For checking whether the user is anonymous on commit
--
1.7.2.rc1.dirty

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

* Re: [PATCH 2/4] git-cvsserver: simplify control flow in pserver  authentication
  2010-07-03 21:22 ` [PATCH 2/4] git-cvsserver: simplify control flow in pserver authentication Áshin László
@ 2010-07-03 22:16   ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 2+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-07-03 22:16 UTC (permalink / raw)
  To: Áshin László; +Cc: git

Looks good. That code is somewhat contrived as-is.

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

end of thread, other threads:[~2010-07-03 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1707116361121042582@unknownmsgid>
2010-07-03 21:22 ` [PATCH 2/4] git-cvsserver: simplify control flow in pserver authentication Áshin László
2010-07-03 22:16   ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).