diff options
author | Nicolas Pitre <nico@cam.org> | 2006-12-18 15:16:58 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-18 15:31:28 -0800 |
commit | b3d9899324af174ff123498b5c7ded3749aac2bc (patch) | |
tree | a989a00d3ec4a50a281f29c980101ac3d2a4144a | |
parent | 57b73150c4f1dbc26474a0031f433fb34db1c13f (diff) | |
download | git-b3d9899324af174ff123498b5c7ded3749aac2bc.tar.gz |
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>
-rwxr-xr-x | git-fetch.sh | 2 | ||||
-rwxr-xr-x | git-ls-remote.sh | 2 | ||||
-rw-r--r-- | pkt-line.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/git-fetch.sh b/git-fetch.sh index 38101a6ace..ffbd44f0e1 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -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" diff --git a/git-ls-remote.sh b/git-ls-remote.sh index 0f88953f29..03b624ef33 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 c1e81f976f..b4cb7e2756 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("The remote end hung up unexpectedly"); n += ret; } } |