unset CDPATH
usage() {
- echo >&2 "* git clone [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo> [<dir>]"
+ echo >&2 "Usage: $0 [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo> [<dir>]"
exit 1
}
*,-n) no_checkout=yes ;;
*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
*,-s|*,--s|*,--sh|*,--sha|*,--shar|*,--share|*,--shared)
- local_shared=yes ;;
+ local_shared=yes; use_local=yes ;;
*,-q|*,--quiet) quiet=-q ;;
1,-u|1,--upload-pack) usage ;;
*,-u|*,--upload-pack)
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
;;