Skip to content

Commit

Permalink
Allow non-fast-forward of remote tracking branches in default clone
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Dec 29, 2006
1 parent e19b9dd commit 013672b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" &&
Expand Down

0 comments on commit 013672b

Please sign in to comment.