DORMANTno replies

[PATCH] Fix unconditional early exit in cg-fetch

From: Paolo 'Blaisorblade' Giarrusso <hidden>
Date: 2016-06-15 22:42:15
Subsystem: the rest · Maintainer: Linus Torvalds

From: Paolo 'Blaisorblade' Giarrusso <redacted>

When invoking cg-fetch, after fetching tags it exits here, probably for an
overlooked error handling (at least I corrected it this way).

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 <redacted>
---

 cg-fetch |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cg-fetch b/cg-fetch
index a2865ae..a489834 100755
--- a/cg-fetch
+++ b/cg-fetch
@@ -190,8 +190,8 @@ fetch_tags()
 
 	if [ "$get" = "get_rsync" ]; then
 		$get -i -s -u -d "$uri/refs/tags" "$_git/refs/tags" ||
-			echo "unable to get tags list (non-fatal)" >&2
-		exit $?
+			(echo "unable to get tags list (non-fatal)" >&2;
+			exit $?)
 	fi
 
 	git-ls-remote --tags "$uri" |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help