@matheusbsbs / matheus-bagliano / commits / 0a8b4def9a
Fork 0

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>

Junio C Hamano committed Dec 13, 2005 at 15:58 UTC 0a8b4def9ae9e929a3310b536782a80a7c7644e7
1 file changed +4 -1
git-clone.sh
+4 -1
@@ -188,7 +188,10 @@ yes,yes)
188 cd "$D" && case "$upload_pack" in
189 '') git-clone-pack $quiet "$repo" ;;
190 *) git-clone-pack $quiet "$upload_pack" "$repo" ;;
191 - esac
191 + esac || {
192 + echo >&2 "clone-pack from '$repo' failed."
193 + exit 1
194 + }
195 ;;
196 esac
197 ;;