[PATCH 2/2] Allow non-fast-forward of remote tracking branches in default clone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 git-clone.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-clone.sh b/git-clone.sh
index f37eb9d..3d388de 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -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" &&
-- 
1.5.0.rc0.gf5c587


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]