@matheusbsbs / matheus-bagliano / commits / ae1dffcb28
Fork 0

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>

Junio C Hamano committed Jan 23, 2007 at 00:51 UTC ae1dffcb28ee89a23f8d2747be65e17c8eab1690
3 files changed +15 -6
git-clone.sh
+3 -1
@@ -163,7 +163,9 @@ while
163 1,-u|1,--upload-pack) usage ;;
164 *,-u|*,--upload-pack)
165 shift
166 - upload_pack="--exec=$1" ;;
166 + upload_pack="--upload-pack=$1" ;;
167 + *,--upload-pack=*)
168 + upload_pack=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)') ;;
169 1,--depth) usage;;
170 *,--depth)
171 shift
git-fetch.sh
+7 -4
@@ -22,7 +22,6 @@ force=
22 verbose=
23 update_head_ok=
24 exec=
25 -upload_pack=
25 keep=
26 shallow_depth=
27 while case "$#" in 0) break ;; esac
@@ -34,8 +33,12 @@ do
33 --upl|--uplo|--uploa|--upload|--upload-|--upload-p|\
34 --upload-pa|--upload-pac|--upload-pack)
35 shift
37 - exec="--exec=$1"
38 - upload_pack="-u $1"
36 + exec="--upload-pack=$1"
37 + ;;
38 + --upl=*|--uplo=*|--uploa=*|--upload=*|\
39 + --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*)
40 + exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)')
41 + shift
42 ;;
43 -f|--f|--fo|--for|--forc|--force)
44 force=t
@@ -94,7 +97,7 @@ then
97 fi
98
99 # Global that is reused later
97 -ls_remote_result=$(git ls-remote $upload_pack "$remote") ||
100 +ls_remote_result=$(git ls-remote $exec "$remote") ||
101 die "Cannot get the repository state from $remote"
102
103 append_fetch_head () {
git-ls-remote.sh
+5 -1
@@ -23,7 +23,11 @@ do
23 -u|--u|--up|--upl|--uploa|--upload|--upload-|--upload-p|--upload-pa|\
24 --upload-pac|--upload-pack)
25 shift
26 - exec="--exec=$1"
26 + exec="--upload-pack=$1"
27 + shift;;
28 + -u=*|--u=*|--up=*|--upl=*|--uplo=*|--uploa=*|--upload=*|\
29 + --upload-=*|--upload-p=*|--upload-pa=*|--upload-pac=*|--upload-pack=*)
30 + exec=--upload-pack=$(expr "$1" : '-[^=]*=\(.*\)')
31 shift;;
32 --)
33 shift; break ;;