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

exit with error for "git remote update"

From
Robert Schiele <rschiele@gmail.com>
Date
Dec 12, 2007, 06:17 UTC
Message-ID
<20071212061722.GI4167@schiele.dyndns.org>
Hi,

When I call "git remote update" without an additional parameter it always returns with an error, even when all fetch commands processed without a problem.

This is because of the exit(1) in the following code:
elsif ($ARGV[0] eq 'update') {
        if (@ARGV <= 1) {
                update_remote("default");
                exit(1);
        }
        for ($i = 1; $i < @ARGV; $i++) {
                update_remote($ARGV[$i]);
        }
}

Shouldn't this exit(1) be an exit(0) instead or just rewrite this part of the code as

elsif ($ARGV[0] eq 'update') {
        if (@ARGV <= 1) {
                update_remote("default");
        } else {
                for ($i = 1; $i < @ARGV; $i++) {
                        update_remote($ARGV[$i]);
                }
        }
}
Robert
-- 
Robert Schiele
Dipl.-Wirtsch.informatiker	mailto:rschiele@gmail.com

"Quidquid latine dictum sit, altum sonatur."
Message 1 of 1 in “exit with error for "git remote update"”
  1. Robert SchieleDec 12, 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.