From: Junio C Hamano Date: Tue, 23 Jan 2007 08:51:53 +0000 (-0800) Subject: ls-remote and clone: accept --upload-pack= as well. X-Git-Tag: v1.5.0-rc3~67 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ae1dffcb28ee89a23f8d2747be65e17c8eab1690;p=git.git ls-remote and clone: accept --upload-pack= as well. This makes them consistent with other commands that take the path to the upload-pack program. We also pass --upload-pack instead of --exec to the underlying fetch-pack, although it is not strictly necessary. [jc: original motivation from Uwe] Signed-off-by: Junio C Hamano --- diff --git a/git-clone.sh b/git-clone.sh index 0f7bbbfb3..ced7dfba3 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -163,7 +163,9 @@ while 1,-u|1,--upload-pack) usage ;; *,-u|*,--upload-pack) shift - upload_pack="--exec=$1" ;; + upload_pack="--upload-pack=$1" ;; + *,--upload-pack=*) + upload_pack=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') ;; 1,--depth) usage;; *,--depth) shift diff --git a/git-fetch.sh b/git-fetch.sh index 87b940b85..07a1d05ac 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -22,7 +22,6 @@ force= verbose= update_head_ok= exec= -upload_pack= keep= shallow_depth= while case "$#" in 0) break ;; esac @@ -34,8 +33,12 @@ do --upl|--uplo|--uploa|--upload|--upload-|--upload-p|\ --upload-pa|--upload-pac|--upload-pack) shift - exec="--exec=$1" - upload_pack="-u $1" + exec="--upload-pack=$1" + ;; + --upl=*|--uplo=*|--uploa=*|--upload=*|\ + --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*) + exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') + shift ;; -f|--f|--fo|--for|--forc|--force) force=t @@ -94,7 +97,7 @@ then fi # Global that is reused later -ls_remote_result=$(git ls-remote $upload_pack "$remote") || +ls_remote_result=$(git ls-remote $exec "$remote") || die "Cannot get the repository state from $remote" append_fetch_head () { diff --git a/git-ls-remote.sh b/git-ls-remote.sh index 03b624ef3..dd2278382 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -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 ;;