Git development
 help / color / mirror / Atom feed
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
To: Petr Baudis <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: [PATCH] Fix unconditional early exit in cg-fetch v2
Date: Tue, 20 Dec 2005 16:24:58 +0100	[thread overview]
Message-ID: <20051220152458.1302.84228.stgit@zion.home.lan> (raw)


From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

When invoking cg-fetch, after fetching tags it exits here, for an overlooked
error handling. Replace the exit with an early return.

This means, for instance, we exit without reporting the tag updates and without
removing the "fetch in progress" marker - leading to unconditional "Recovering
from interrupted fetch" at the very beginning with rsync transport. Indeed, this
is fixed by this patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 cg-fetch |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/cg-fetch b/cg-fetch
index a2865ae..074aa14 100755
--- a/cg-fetch
+++ b/cg-fetch
@@ -189,9 +189,10 @@ fetch_tags()
 	[ -d "$_git/refs/tags" ] || mkdir -p "$_git/refs/tags"
 
 	if [ "$get" = "get_rsync" ]; then
-		$get -i -s -u -d "$uri/refs/tags" "$_git/refs/tags" ||
+		if ! $get -i -s -u -d "$uri/refs/tags" "$_git/refs/tags"; then
 			echo "unable to get tags list (non-fatal)" >&2
-		exit $?
+			return $?
+		fi
 	fi
 
 	git-ls-remote --tags "$uri" |

                 reply	other threads:[~2005-12-20 18:32 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=20051220152458.1302.84228.stgit@zion.home.lan \
    --to=blaisorblade@yahoo.it \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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