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
fi
;;
http://*)
- clone_dumb_http "$repo" "$D"
+ if test -z "@@NO_CURL@@"
+ then
+ clone_dumb_http "$repo" "$D"
+ else
+ echo >&2 "http transport not supported, rebuild Git with curl support"
+ exit 1
+ fi
;;
*)
cd "$D" && case "$upload_pack" in
cd "$D" || exit
-if test -f "$GIT_DIR/HEAD"
+if test -f "$GIT_DIR/HEAD" && test -z "$bare"
then
head_points_at=`git-symbolic-ref HEAD`
case "$head_points_at" in