diff options
author | Junio C Hamano <junkio@cox.net> | 2006-11-25 01:04:54 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-11-25 01:07:15 -0800 |
commit | cadd8a7d4dad0a29a9b38b33979e7137adaf62cf (patch) | |
tree | 2ed79a3d315629a6abd41ba103b846351dc1a0ac /git-clone.sh | |
parent | 5677882be721be5e2706a546d90804da8d8d0bd5 (diff) | |
parent | f64d7fd267c501f501e18a888e3e1e0c5b56458f (diff) | |
download | git-cadd8a7d4dad0a29a9b38b33979e7137adaf62cf.tar.gz git-cadd8a7d4dad0a29a9b38b33979e7137adaf62cf.tar.xz |
Merge branch 'master' into jc/globfetch
This is to pick up the fix made on master:
git-fetch: exit with non-zero status when fast-forward check fails
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-x | git-clone.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/git-clone.sh b/git-clone.sh index 3f006d1a7..d4ee93f75 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() { @@ -48,6 +48,10 @@ Perhaps git-update-server-info needs to be run there?" case "$name" in *^*) continue;; esac + case "$bare,$name" in + yes,* | ,heads/* | ,tags/*) ;; + *) continue ;; + esac if test -n "$use_separate_remote" && branch_name=`expr "z$name" : 'zheads/\(.*\)'` then @@ -115,7 +119,7 @@ bare= reference= origin= origin_override= -use_separate_remote= +use_separate_remote=t while case "$#,$1" in 0,*) break ;; @@ -134,7 +138,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 +176,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" |