X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-clone.sh;h=b4e858c3885dab55398670d9497304eb83545d1f;hb=a41acc63badf20cbb22cca61039dca9309deaa19;hp=68085a3225cb0047ab3c5764472d3d024e467160;hpb=d9cf4ec9f7ddcc589351e1ac7b0e3b88537a0b25;p=git.git diff --git a/git-clone.sh b/git-clone.sh index 68085a322..b4e858c38 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -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 '')