Allow non-fast-forward of remote tracking branches in default clone
authorJunio C Hamano <junkio@cox.net>
Fri, 29 Dec 2006 00:32:17 +0000 (16:32 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 29 Dec 2006 02:37:33 +0000 (18:37 -0800)
This changes the default remote.origin.fetch configuration
created by git-clone so that it allows non-fast-forward updates.

When using the separate-remote layout with reflog enabled, it
does not make much sense to refuse to update the remote tracking
branch just because some of them do not fast-forward. git-fetch
issues warnings on non-fast-forwardness, and the user can peek
at what the previous state was using the reflog.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh
index f37eb9d105264294e1dd63beaeb192023a0ec8c6..3d388de62a9ee212c8f54f3a5dc9a8b823bc8934 100755 (executable)
@@ -388,7 +388,7 @@ then
 
                # Set up the mappings to track the remote branches.
                git-repo-config remote."$origin".fetch \
-                       "refs/heads/*:$remote_top/*" '^$' &&
+                       "+refs/heads/*:$remote_top/*" '^$' &&
                rm -f "refs/remotes/$origin/HEAD"
                git-symbolic-ref "refs/remotes/$origin/HEAD" \
                        "refs/remotes/$origin/$head_points_at" &&