mirror of
https://github.com/git/git.git
synced 2024-12-05 07:53:59 +08:00
git-clone: typofix.
The traditional one created refs/origin by mistake, not refs/heads/origin. Also it mistakenly failed to prevent $origin from being listed twice in remotes/origin file. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
5ceb05f82e
commit
4c2e98d6ce
@ -370,14 +370,14 @@ then
|
|||||||
Pull: refs/heads/$head_points_at:refs/$origin_tracking" &&
|
Pull: refs/heads/$head_points_at:refs/$origin_tracking" &&
|
||||||
case "$use_separate_remote" in
|
case "$use_separate_remote" in
|
||||||
t) git-update-ref HEAD "$head_sha1" ;;
|
t) git-update-ref HEAD "$head_sha1" ;;
|
||||||
*) git-update-ref "refs/$origin" $(git-rev-parse HEAD) ;;
|
*) git-update-ref "refs/heads/$origin" $(git-rev-parse HEAD) ;;
|
||||||
esac &&
|
esac &&
|
||||||
(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
|
||||||
name=`expr "$dotslref" : './\(.*\)'` &&
|
name=`expr "$dotslref" : './\(.*\)'` &&
|
||||||
test "$head_points_at" = "$name" ||
|
test "$head_points_at" = "$name" ||
|
||||||
test "$origin" = "$head" ||
|
test "$origin" = "$name" ||
|
||||||
echo "Pull: refs/heads/${name}:$remote_top/${name}"
|
echo "Pull: refs/heads/${name}:$remote_top/${name}"
|
||||||
done >>"$GIT_DIR/remotes/$origin" &&
|
done >>"$GIT_DIR/remotes/$origin" &&
|
||||||
case "$use_separate_remote" in
|
case "$use_separate_remote" in
|
||||||
|
Loading…
Reference in New Issue
Block a user