summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-16 01:41:51 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-16 13:01:41 -0800
commit3dd3d5b0e20a74a82a7e684d63d9af86a983fbf6 (patch)
treee310a6673f6d3a5b62493e047efde888264c3164
parenta71fb0a1412c82405f078fb536797d3f5de68d53 (diff)
downloadgit-3dd3d5b0e20a74a82a7e684d63d9af86a983fbf6.tar.gz
git-clone: lose the artificial "first" fetch refspec
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 <junkio@cox.net>
-rwxr-xr-xgit-clone.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 422499a537..68dc4f200a 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