From 0a8b4def9ae9e929a3310b536782a80a7c7644e7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 13 Dec 2005 15:58:00 -0800 Subject: 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 --- git-clone.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git-clone.sh') diff --git a/git-clone.sh b/git-clone.sh index 699205eb66..e49028f684 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 ;; -- cgit v1.2.3 From 806f36d4d7caf75b6d3e098cb0353d85d3477c7d Mon Sep 17 00:00:00 2001 From: "freku045@student.liu.se" Date: Tue, 13 Dec 2005 23:30:31 +0100 Subject: Trivial usage string clean-up Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- git-clone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-clone.sh') diff --git a/git-clone.sh b/git-clone.sh index e49028f684..280cc2e81e 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -9,7 +9,7 @@ unset CDPATH usage() { - echo >&2 "* git clone [-l [-s]] [-q] [-u ] [-n] []" + echo >&2 "Usage: $0 [-l [-s]] [-q] [-u ] [-n] []" exit 1 } -- cgit v1.2.3