From: Junio C Hamano Date: Sat, 16 Dec 2006 09:41:51 GMT Subject: [PATCH] git-clone: lose the artificial "first" fetch refspec Message-ID: <7vvekci3ds.fsf_-_@assigned-by-dhcp.cox.net> In-Reply-To: <7v3b7gji73.fsf@assigned-by-dhcp.cox.net> Now we lost the "first refspec is the one that is merged by default" rule, there is no reason for clone to list the remote primary branch in the config file explicitly anymore. We still need it for the traditional layout for other reasons, though. Signed-off-by: Junio C Hamano --- > Junio C Hamano writes: > >> We could also lose the "primary branch" mapping at the >> beginning, but that has to wait until we implement the "forbid >> 'git pull' when we do not have branch.$current.merge for the >> current branch" policy we earlier discussed. That should also >> be in v1.5.0 > > And this does exactly that. Next step will be to remove the traditional layout altogether. With the recent flurry of UI updates, I think it is sane to do that before v1.5.0; opinions? git-clone.sh | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/git-clone.sh b/git-clone.sh index 422499a..68dc4f2 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -380,18 +380,18 @@ then git-update-ref "refs/heads/$origin" "$head_sha1" ;; esac && - # Upstream URL and the primary branch tracking + # Upstream URL git-repo-config remote."$origin".url "$repo" && - git-repo-config remote."$origin".fetch \ - "refs/heads/$head_points_at:$origin_track" && - # Set up the mappings to track the remaining branches. + # Set up the mappings to track the remote branches. case "$use_separate_remote" in t) git-repo-config remote."$origin".fetch \ "refs/heads/*:$remote_top/*" '^$' ;; *) + git-repo-config remote."$origin".fetch \ + "refs/heads/$head_points_at:$origin_track" && (cd "$GIT_DIR/$remote_top" && find . -type f -print) | while read dotslref do