summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4fb66a6)
raw | patch | inline | side by side (parent: 4fb66a6)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 23 Jan 2006 01:28:49 +0000 (17:28 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 25 Jan 2006 07:17:06 +0000 (23:17 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh | patch | blob | history |
diff --git a/git-clone.sh b/git-clone.sh
index 73fc919800357b35d8e2550a38517f2b58ece6c3..47f3ec9761ba3e681e3035e6ae1c7449a6177a5e 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
upload_pack=
bare=
origin=origin
+origin_override=
while
case "$#,$1" in
0,*) break ;;
echo >&2 "'$2' is not suitable for a branch name"
exit 1
}
+ test -z "$origin_override" || {
+ echo >&2 "Do not give more than one -o options."
+ exit 1
+ }
+ origin_override=yes
origin="$2"; shift
;;
1,-u|1,--upload-pack) usage ;;
done
# --bare implies --no-checkout
-test =z "$bare" || no_checkout=yes
+if test yes = "$bare"
+then
+ if test yes = "$origin_override"
+ then
+ echo >&2 '--bare and -o $origin options are incompatible.'
+ exit 1
+ fi
+ no_checkout=yes
+fi
# Turn the source into an absolute path if
# it is local