clone: do not create remotes/origin nor origin branch in a bare repository.
[git.git] / git-clone.sh
index 8e65202..73fc919 100755 (executable)
@@ -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