git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Áshin László" <ashinlaszlo@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 2/4] git-cvsserver: simplify control flow in pserver  authentication
Date: Sat, 3 Jul 2010 23:22:45 +0200	[thread overview]
Message-ID: <AANLkTiktRjlLWrvLG4Jkd_Yu7FLAgJ6_mhYITy3bI3Cb@mail.gmail.com> (raw)
In-Reply-To: <1707116361121042582@unknownmsgid>

 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

       reply	other threads:[~2010-07-03 21:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1707116361121042582@unknownmsgid>
2010-07-03 21:22 ` Áshin László [this message]
2010-07-03 22:16   ` [PATCH 2/4] git-cvsserver: simplify control flow in pserver authentication Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTiktRjlLWrvLG4Jkd_Yu7FLAgJ6_mhYITy3bI3Cb@mail.gmail.com \
    --to=ashinlaszlo@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).