[PATCH] make git a bit less cryptic on fetch errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The remote server might not want to tell why it doesn't like us for 
security reasons, but let's make the client report such error in a bit 
less confusing way.  The remote failure remains a mystery, but the local 
message might be a bit less so.

Signed-off-by: Nicolas Pitre <nico@xxxxxxx>

---

diff --git a/git-fetch.sh b/git-fetch.sh
index 4fb5ab8..102e633 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -104,7 +104,7 @@ fi
 
 # Global that is reused later
 ls_remote_result=$(git ls-remote $upload_pack "$remote") ||
-	die "Cannot find the reflist at $remote"
+	die "Cannot get the repository state from $remote"
 
 append_fetch_head () {
     head_="$1"
diff --git a/git-ls-remote.sh b/git-ls-remote.sh
index 0f88953..03b624e 100755
--- a/git-ls-remote.sh
+++ b/git-ls-remote.sh
@@ -94,7 +94,7 @@ while read sha1 path
 do
 	case "$sha1" in
 	failed)
-		die "Failed to find remote refs"
+		exit 1 ;;
 	esac
 	case "$path" in
 	refs/heads/*)
diff --git a/pkt-line.c b/pkt-line.c
index c1e81f9..e7528b1 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -72,7 +72,7 @@ static void safe_read(int fd, void *buffer, unsigned size)
 		if (ret < 0)
 			die("read error (%s)", strerror(errno));
 		if (!ret)
-			die("unexpected EOF");
+			die("for some reason the remote end hung up unexpectedly");
 		n += ret;
 	}
 }
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]