summaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2006-11-23 23:58:35 +0100
committerJunio C Hamano <junkio@cox.net>2006-11-23 22:53:06 -0800
commit7182135189d1942d8538a0d0c17fc79f5cb82c71 (patch)
treee7a9dfa1f913c8f8f515259c751fa1117597bb8b /git-clone.sh
parent29561ad0adadf4884858c209bb22b41d8d9a66ba (diff)
downloadgit-7182135189d1942d8538a0d0c17fc79f5cb82c71.tar.gz
Make git-clone --use-separate-remote the default
We've talked about this for quite some time on the list, and it is a sane thing to do for a repository with an associcated working tree. For somebody who wants to use the traditional layout, there is a backward compatibility option --use-immingled-remote, but it is expected to be removed before the next major release. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 3f006d1a77..9ed4135544 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -14,7 +14,7 @@ die() {
}
usage() {
- die "Usage: $0 [--template=<template_directory>] [--use-separate-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [-n] <repo> [<dir>]"
+ die "Usage: $0 [--template=<template_directory>] [--use-immingled-remote] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [-n] <repo> [<dir>]"
}
get_repo_base() {
@@ -115,7 +115,7 @@ bare=
reference=
origin=
origin_override=
-use_separate_remote=
+use_separate_remote=t
while
case "$#,$1" in
0,*) break ;;
@@ -134,7 +134,10 @@ while
template="$1" ;;
*,-q|*,--quiet) quiet=-q ;;
*,--use-separate-remote)
+ # default
use_separate_remote=t ;;
+ *,--use-immingled-remote)
+ use_separate_remote= ;;
1,--reference) usage ;;
*,--reference)
shift; reference="$1" ;;
@@ -169,18 +172,15 @@ repo="$1"
test -n "$repo" ||
die 'you must specify a repository to clone.'
-# --bare implies --no-checkout
+# --bare implies --no-checkout and --use-immingled-remote
if test yes = "$bare"
then
if test yes = "$origin_override"
then
die '--bare and --origin $origin options are incompatible.'
fi
- if test t = "$use_separate_remote"
- then
- die '--bare and --use-separate-remote options are incompatible.'
- fi
no_checkout=yes
+ use_separate_remote=
fi
if test -z "$origin"