aboutsummaryrefslogtreecommitdiff
path: root/git-fetch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-23 00:51:53 -0800
committerJunio C Hamano <junkio@cox.net>2007-01-24 16:12:15 -0800
commitae1dffcb28ee89a23f8d2747be65e17c8eab1690 (patch)
tree669b709d9699b1da49dbeb69813c33b44707c56f /git-fetch.sh
parent27dca07fb77f6f5851e3a8de54f86c803358caa4 (diff)
downloadgit-ae1dffcb28ee89a23f8d2747be65e17c8eab1690.tar.gz
git-ae1dffcb28ee89a23f8d2747be65e17c8eab1690.tar.xz
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>
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-xgit-fetch.sh11
1 files changed, 7 insertions, 4 deletions
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 () {