expose a helper function peel_to_type().
[gitweb.git] / git-clone.sh
index 68085a3225cb0047ab3c5764472d3d024e467160..b4e858c3885dab55398670d9497304eb83545d1f 100755 (executable)
@@ -56,11 +56,12 @@ fi
 
 http_fetch () {
        # $1 = Remote, $2 = Local
-       curl -nsfL $curl_extra_args "$1" >"$2" ||
-               case $? in
-               126|127) exit ;;
-               *)       return $? ;;
-               esac
+       curl -nsfL $curl_extra_args "$1" >"$2"
+       curl_exit_status=$?
+       case $curl_exit_status in
+       126|127) exit ;;
+       *)       return $curl_exit_status ;;
+       esac
 }
 
 clone_dumb_http () {
@@ -151,7 +152,7 @@ do
                die "clones are always made with separate-remote layout" ;;
        --reference)
                shift; reference="$1" ;;
-       -o,--origin)
+       -o|--origin)
                shift;
                case "$1" in
                '')