Skip to content

Commit

Permalink
make git a bit less cryptic on fetch errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Dec 18, 2006
1 parent 57b7315 commit b3d9899
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion git-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion git-ls-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/*)
Expand Down
2 changes: 1 addition & 1 deletion pkt-line.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit b3d9899

Please sign in to comment.