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 17, 2007, 14:05 UTC
Message-ID
<20071017140547.GA21691@Hermes.cust.hotspot.t-mobile.com>
This was causing test failures because die was exiting 255.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---
 Shawn, I sent this in a couple weeks ago but it looks like it never
 made it into your repo.  It fixes test failures on my machine that have
 been plauging me for months.
 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.206.g0cef9
Next: Morten Welinder
Message 1 of 12 in “Use exit 1 instead of die when req_Root fails.”
  1. Use exit 1 instead of die when req_Root fails.Brian Gernhardt, Oct 17, 2007
  2. Morten WelinderOct 17, 2007
  3. Brian GernhardtOct 17, 2007
  4. Lars HjemliOct 17, 2007
  5. Brian GernhardtOct 17, 2007
  6. Lars HjemliOct 17, 2007
  7. Jan HudecOct 18, 2007
  8. Frank LichtenheldOct 17, 2007
  9. Frank LichtenheldOct 17, 2007
  10. Brian GernhardtOct 17, 2007
  11. Shawn O. PearceOct 18, 2007
  12. Frank LichtenheldOct 18, 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.