aboutsummaryrefslogtreecommitdiffstats
path: root/git-clone-script
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-07-13 20:25:54 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-13 20:42:26 -0700
commit6ec311da34cbbc8a571bf889b6ef00c4efb441b5 (patch)
treec3233ceedd0e36f84b4265f91ad4fb972cdef44a /git-clone-script
parentd46ad9c989c0c4afc9507b48206f26f75a2fbd24 (diff)
downloadgit-6ec311da34cbbc8a571bf889b6ef00c4efb441b5.tar.gz
[PATCH] clone-pack and clone-script: documentation and add a missing parameter.
While adding the documentation for these two commands, I noticed that the name of the program on the other end (git-upload-pack) is already almost configurable but git-clone-pack lacked command line parameter parsing to actually use anything but default, so I introduced --exec= like other remote commands while I was at it. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'git-clone-script')
-rwxr-xr-xgit-clone-script12
1 files changed, 10 insertions, 2 deletions
diff --git a/git-clone-script b/git-clone-script
index f92851ca4b..88e2c1f706 100755
--- a/git-clone-script
+++ b/git-clone-script
@@ -6,7 +6,7 @@
# Clone a repository into a different directory that does not yet exist.
usage() {
- echo >&2 "* git clone [-l] <repo> <dir>"
+ echo >&2 "* git clone [-l] [-q] [-u <upload-pack>] <repo> <dir>"
exit 1
}
@@ -16,11 +16,16 @@ get_repo_base() {
quiet=
use_local=no
+upload_pack=
while
case "$#,$1" in
0,*) break ;;
*,-l|*,--l|*,--lo|*,--loc|*,--loca|*,--local) use_local=yes ;;
*,-q|*,--quiet) quiet=-q ;;
+ 1,-u|*,--upload-pack) usage ;;
+ *,-u|*,--upload-pack)
+ shift
+ upload_pack="--exec=$2" ;;
*,-*) usage ;;
*) break ;;
esac
@@ -90,6 +95,9 @@ http://*)
exit 1
;;
*)
- cd "$D" && git-clone-pack $quiet "$repo"
+ cd "$D" && case "$upload_pack" in
+ '') git-clone-pack $quiet "$repo" ;;
+ *) git-clone-pack $quiet "$upload_pack" "$repo" ;;
+ esac
;;
esac