clone: do not create remotes/origin nor origin branch in a bare repository.
[gitweb.git] / git-clone.sh
index 8e65202320303d3c4fa591a9d39506b5b4374fd9..73fc919800357b35d8e2550a38517f2b58ece6c3 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