зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
a71fb0a141
Коммит
3dd3d5b0e2
|
@ -380,18 +380,18 @@ then
|
||||||
git-update-ref "refs/heads/$origin" "$head_sha1" ;;
|
git-update-ref "refs/heads/$origin" "$head_sha1" ;;
|
||||||
esac &&
|
esac &&
|
||||||
|
|
||||||
# Upstream URL and the primary branch tracking
|
# Upstream URL
|
||||||
git-repo-config remote."$origin".url "$repo" &&
|
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
|
case "$use_separate_remote" in
|
||||||
t)
|
t)
|
||||||
git-repo-config remote."$origin".fetch \
|
git-repo-config remote."$origin".fetch \
|
||||||
"refs/heads/*:$remote_top/*" '^$'
|
"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) |
|
(cd "$GIT_DIR/$remote_top" && find . -type f -print) |
|
||||||
while read dotslref
|
while read dotslref
|
||||||
do
|
do
|
||||||
|
|
Загрузка…
Ссылка в новой задаче