clone: do not create remotes/origin nor origin branch in a bare repository.
It is simply pointless, since no merges will ever happen in such a repository. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 22, 2006 at 17:27 UTC
4fb66a62eeb7bfec115cd0058d7a05ab62fc23e7
2 files changed
+4
-2
Documentation/git-clone.txt
+3
-1
@@ -62,7 +62,9 @@ OPTIONS
62
Make a 'bare' GIT repository. That is, instead of
63
creating `<directory>` and placing the administrative
64
files in `<directory>/.git`, make the `<directory>`
65
- itself the `$GIT_DIR`. This implies `-n` option.
65
+ itself the `$GIT_DIR`. This implies `-n` option. When
66
+ this option is used, neither the `origin` branch nor the
67
+ default `remotes/origin` file is created.
68
69
-o <name>::
70
Instead of using the branch name 'origin' to keep track
git-clone.sh
+1
-1
@@ -209,7 +209,7 @@ esac
209
210
cd "$D" || exit
211
212
-if test -f "$GIT_DIR/HEAD"
212
+if test -f "$GIT_DIR/HEAD" && test -z "$bare"
213
then
214
head_points_at=`git-symbolic-ref HEAD`
215
case "$head_points_at" in