summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-clone.txt4
-rwxr-xr-xgit-clone.sh2
2 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 370f53e769..684e4bdf69 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -62,7 +62,9 @@ OPTIONS
Make a 'bare' GIT repository. That is, instead of
creating `<directory>` and placing the administrative
files in `<directory>/.git`, make the `<directory>`
- itself the `$GIT_DIR`. This implies `-n` option.
+ itself the `$GIT_DIR`. This implies `-n` option. When
+ this option is used, neither the `origin` branch nor the
+ default `remotes/origin` file is created.
-o <name>::
Instead of using the branch name 'origin' to keep track
diff --git a/git-clone.sh b/git-clone.sh
index 8e65202320..73fc919800 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -209,7 +209,7 @@ esac
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