Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-clone: lose the artificial "first" fetch refspec
author
Junio C Hamano
<junkio@cox.net>
Sat, 16 Dec 2006 09:41:51 +0000
(
01:41
-0800)
committer
Junio C Hamano
<junkio@cox.net>
Sat, 16 Dec 2006 21:01:41 +0000
(13:01 -0800)
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>
git-clone.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a71fb0a
)
diff --git
a/git-clone.sh
b/git-clone.sh
index 422499a5372e5662fbf7ca36ad260229ec03331e..68dc4f200ac78efcfa6fb1bf3bc5e6f88181e193 100755
(executable)
--- a/
git-clone.sh
+++ b/
git-clone.sh
@@
-380,18
+380,18
@@
then
git-update-ref "refs/heads/$origin" "$head_sha1" ;;
esac &&
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".url "$repo" &&
- git-repo-config remote."$origin".fetch \
- "refs/heads/$head_points_at:$origin_track" &&
- # Set up the mappings to track the rem
aining
branches.
+ # Set up the mappings to track the rem
ote
branches.
case "$use_separate_remote" in
t)
git-repo-config remote."$origin".fetch \
"refs/heads/*:$remote_top/*" '^$'
;;
*)
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
(cd "$GIT_DIR/$remote_top" && find . -type f -print) |
while read dotslref
do