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>
Junio C Hamano committed
Dec 16, 2006 at 01:41 UTC
3dd3d5b0e20a74a82a7e684d63d9af86a983fbf6
1 file changed
+4
-4
git-clone.sh
+4
-4
@@ -380,18 +380,18 @@ then
380
git-update-ref "refs/heads/$origin" "$head_sha1" ;;
381
esac &&
382
383
- # Upstream URL and the primary branch tracking
383
+ # Upstream URL
384
git-repo-config remote."$origin".url "$repo" &&
385
- git-repo-config remote."$origin".fetch \
386
- "refs/heads/$head_points_at:$origin_track" &&
385
388
- # Set up the mappings to track the remaining branches.
386
+ # Set up the mappings to track the remote branches.
387
case "$use_separate_remote" in
388
t)
389
git-repo-config remote."$origin".fetch \
390
"refs/heads/*:$remote_top/*" '^$'
391
;;
392
*)
393
+ git-repo-config remote."$origin".fetch \
394
+ "refs/heads/$head_points_at:$origin_track" &&
395
(cd "$GIT_DIR/$remote_top" && find . -type f -print) |
396
while read dotslref
397
do