git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Schiele <rschiele@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: git@vger.kernel.org
Subject: exit with error for "git remote update"
Date: Wed, 12 Dec 2007 07:17:22 +0100	[thread overview]
Message-ID: <20071212061722.GI4167@schiele.dyndns.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

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."

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

                 reply	other threads:[~2007-12-12  6:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20071212061722.GI4167@schiele.dyndns.org \
    --to=rschiele@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).