Allow fetch-pack to decide keeping the fetched pack without exploding
[gitweb.git] / git-ls-remote.sh
index 0f88953f299c1fd1243c3d5d6ae1e71d56e842a8..dd22783824ab8d01bba9e589aa0f60d59c859272 100755 (executable)
@@ -23,7 +23,11 @@ do
   -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\
   --upload-pac|--upload-pack)
        shift
-       exec="--exec=$1"
+       exec="--upload-pack=$1"
+       shift;;
+  -u=*|--u=*|--up=*|--upl=*|--uplo=*|--uploa=*|--upload=*|\
+  --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*)
+       exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)')
        shift;;
   --)
   shift; break ;;
@@ -94,7 +98,7 @@ while read sha1 path
 do
        case "$sha1" in
        failed)
-               die "Failed to find remote refs"
+               exit 1 ;;
        esac
        case "$path" in
        refs/heads/*)