X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-clone.sh;h=b4e858c3885dab55398670d9497304eb83545d1f;hb=d3c2d9e5ff1b8d9343cf4db6096bd44a264750d4;hp=68085a3225cb0047ab3c5764472d3d024e467160;hpb=cfa97ae141160486dbe8a786487bcaa965a160f0;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 '')