提交 b3d98993 编写于 作者: N Nicolas Pitre 提交者: Junio C Hamano

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: NNicolas Pitre <nico@cam.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 57b73150
......@@ -96,7 +96,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"
......
......@@ -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/*)
......
......@@ -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("The remote end hung up unexpectedly");
n += ret;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册