make git a bit less cryptic on fetch errors
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. [jc: with a gentle wording updates from Andy Parkins] Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Nicolas Pitre committed
Dec 18, 2006 at 15:16 UTC
b3d9899324af174ff123498b5c7ded3749aac2bc
3 files changed
+3
-3
git-fetch.sh
+1
-1
@@ -96,7 +96,7 @@ fi
96
97
# Global that is reused later
98
ls_remote_result=$(git ls-remote $upload_pack "$remote") ||
99
- die "Cannot find the reflist at $remote"
99
+ die "Cannot get the repository state from $remote"
100
101
append_fetch_head () {
102
head_="$1"
git-ls-remote.sh
+1
-1
@@ -94,7 +94,7 @@ while read sha1 path
94
do
95
case "$sha1" in
96
failed)
97
- die "Failed to find remote refs"
97
+ exit 1 ;;
98
esac
99
case "$path" in
100
refs/heads/*)
pkt-line.c
+1
-1
@@ -72,7 +72,7 @@ static void safe_read(int fd, void *buffer, unsigned size)
72
if (ret < 0)
73
die("read error (%s)", strerror(errno));
74
if (!ret)
75
- die("unexpected EOF");
75
+ die("The remote end hung up unexpectedly");
76
n += ret;
77
}
78
}