Skip to content

Commit 4c2e98d

Browse files
author
Junio C Hamano
committed
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>
1 parent 5ceb05f commit 4c2e98d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-clone.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,14 @@ then
370370
Pull: refs/heads/$head_points_at:refs/$origin_tracking" &&
371371
case "$use_separate_remote" in
372372
t) git-update-ref HEAD "$head_sha1" ;;
373-
*) git-update-ref "refs/$origin" $(git-rev-parse HEAD) ;;
373+
*) git-update-ref "refs/heads/$origin" $(git-rev-parse HEAD) ;;
374374
esac &&
375375
(cd "$GIT_DIR/$remote_top" && find . -type f -print) |
376376
while read dotslref
377377
do
378378
name=`expr "$dotslref" : './\(.*\)'` &&
379379
test "$head_points_at" = "$name" ||
380-
test "$origin" = "$head" ||
380+
test "$origin" = "$name" ||
381381
echo "Pull: refs/heads/${name}:$remote_top/${name}"
382382
done >>"$GIT_DIR/remotes/$origin" &&
383383
case "$use_separate_remote" in

0 commit comments

Comments
 (0)