@matheusbsbs / matheus-bagliano / commits / 013672bc58
Fork 0

Allow non-fast-forward of remote tracking branches in default clone

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>

Junio C Hamano committed Dec 28, 2006 at 16:32 UTC 013672bc589da395fcba9bf62d699e70f3764689
1 file changed +1 -1
git-clone.sh
+1 -1
@@ -388,7 +388,7 @@ then
388
389 # Set up the mappings to track the remote branches.
390 git-repo-config remote."$origin".fetch \
391 - "refs/heads/*:$remote_top/*" '^$' &&
391 + "+refs/heads/*:$remote_top/*" '^$' &&
392 rm -f "refs/remotes/$origin/HEAD"
393 git-symbolic-ref "refs/remotes/$origin/HEAD" \
394 "refs/remotes/$origin/$head_points_at" &&