git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Use exit 1 instead of die when req_Root fails.

From
Brian Gernhardt <benji@silverinsanity.com>
Date
Oct 4, 2007, 01:43 UTC
Message-ID
<20071004014253.GA22390@Hermes.local>
In-Reply-To
<20071004011954.GK18024@planck.djpig.de>

This was causing test failures because die was exiting 255. ---

 This finally takes care of my test failures.
 
 git-cvsserver.perl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 13dbd27..0d55fec 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -145,8 +145,10 @@ if ($state->{method} eq 'pserver') {
     }
     my $request = $1;
     $line = <STDIN>; chomp $line;
-    req_Root('root', $line) # reuse Root
-       or die "E Invalid root $line \n";
+    unless (req_Root('root', $line)) { # reuse Root
+       print "E Invalid root $line \n";
+       exit 1;
+    }
     $line = <STDIN>; chomp $line;
     unless ($line eq 'anonymous') {
        print "E Only anonymous user allowed via pserver\n";
-- 
1.5.3.4.203.gcc61a
Previous: Frank Lichtenheld
Message 3 of 3 in “git-cvsserver test failures (still)”
  1. Brian GernhardtOct 3, 2007
  2. Frank LichtenheldOct 4, 2007
  3. Use exit 1 instead of die when req_Root fails.Brian Gernhardt, Oct 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.