ls-remote and clone: accept --upload-pack=<path> 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 <junkio@cox.net>
This commit is contained in:
parent
27dca07fb7
commit
ae1dffcb28
@ -163,7 +163,9 @@ while
|
|||||||
1,-u|1,--upload-pack) usage ;;
|
1,-u|1,--upload-pack) usage ;;
|
||||||
*,-u|*,--upload-pack)
|
*,-u|*,--upload-pack)
|
||||||
shift
|
shift
|
||||||
upload_pack="--exec=$1" ;;
|
upload_pack="--upload-pack=$1" ;;
|
||||||
|
*,--upload-pack=*)
|
||||||
|
upload_pack=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') ;;
|
||||||
1,--depth) usage;;
|
1,--depth) usage;;
|
||||||
*,--depth)
|
*,--depth)
|
||||||
shift
|
shift
|
||||||
|
11
git-fetch.sh
11
git-fetch.sh
@ -22,7 +22,6 @@ force=
|
|||||||
verbose=
|
verbose=
|
||||||
update_head_ok=
|
update_head_ok=
|
||||||
exec=
|
exec=
|
||||||
upload_pack=
|
|
||||||
keep=
|
keep=
|
||||||
shallow_depth=
|
shallow_depth=
|
||||||
while case "$#" in 0) break ;; esac
|
while case "$#" in 0) break ;; esac
|
||||||
@ -34,8 +33,12 @@ do
|
|||||||
--upl|--uplo|--uploa|--upload|--upload-|--upload-p|\
|
--upl|--uplo|--uploa|--upload|--upload-|--upload-p|\
|
||||||
--upload-pa|--upload-pac|--upload-pack)
|
--upload-pa|--upload-pac|--upload-pack)
|
||||||
shift
|
shift
|
||||||
exec="--exec=$1"
|
exec="--upload-pack=$1"
|
||||||
upload_pack="-u $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)
|
-f|--f|--fo|--for|--forc|--force)
|
||||||
force=t
|
force=t
|
||||||
@ -94,7 +97,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Global that is reused later
|
# 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"
|
die "Cannot get the repository state from $remote"
|
||||||
|
|
||||||
append_fetch_head () {
|
append_fetch_head () {
|
||||||
|
@ -23,7 +23,11 @@ do
|
|||||||
-u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\
|
-u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\
|
||||||
--upload-pac|--upload-pack)
|
--upload-pac|--upload-pack)
|
||||||
shift
|
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;;
|
||||||
--)
|
--)
|
||||||
shift; break ;;
|
shift; break ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user