summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-13 23:58:00 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-13 23:58:00 (GMT)
commit0a8b4def9ae9e929a3310b536782a80a7c7644e7 (patch)
tree4b5cca28c8ad6aa367b6a4380857cb9998b2db8b
parent9755afbd9467759bb77a6e5a535791243c5b907d (diff)
downloadgit-0a8b4def9ae9e929a3310b536782a80a7c7644e7.zip
git-0a8b4def9ae9e929a3310b536782a80a7c7644e7.tar.gz
git-0a8b4def9ae9e929a3310b536782a80a7c7644e7.tar.bz2
git-clone: tell the user a bit more about clone-pack failure.
When clone-pack has trouble with the remote, it dies unfriendly "EOF" error message. We cannot tell the reason why it failed from the local end; it could be that the repository did not exist, or configured not to serve over git-daemon, or a network failure. At least, saying clone-pack failed makes it a bit more meaningful. I am not convinced yet that removing the newly created directory is the right thing to do, so this commit leaves the new directory behind. Reported by Sam Ravnborg. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-clone.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 699205e..e49028f 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -188,7 +188,10 @@ yes,yes)
cd "$D" && case "$upload_pack" in
'') git-clone-pack $quiet "$repo" ;;
*) git-clone-pack $quiet "$upload_pack" "$repo" ;;
- esac
+ esac || {
+ echo >&2 "clone-pack from '$repo' failed."
+ exit 1
+ }
;;
esac
;;