summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 47874d6)
raw | patch | inline | side by side (parent: 47874d6)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 21 Mar 2006 09:58:26 +0000 (01:58 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 21 Mar 2006 10:02:46 +0000 (02:02 -0800) |
This matches c51d13692d4e451c755dd7da3521c5db395df192 commit to
record the primary branch of the remote with a symbolic ref
remotes/$origin/HEAD. The user can later change it to point at
different branch to change the meaning of "$origin" shorthand.
Signed-off-by: Junio C Hamano <junkio@cox.net>
record the primary branch of the remote with a symbolic ref
remotes/$origin/HEAD. The user can later change it to point at
different branch to change the meaning of "$origin" shorthand.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh | patch | blob | history |
diff --git a/git-clone.sh b/git-clone.sh
index 3b5475340d4c9687bd1ade4464689d23d6692f93..5953e18a5bfda9a2ceee6a5038d9401e5073bd17 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
if test -n "$use_separate_remote" &&
branch_name=`expr "$name" : 'heads/\(.*\)'`
then
- tname="remotes/$branch_name"
+ tname="remotes/$origin/$branch_name"
else
tname=$name
fi
Pull: refs/heads/$head_points_at:refs/$origin_tracking" &&
case "$use_separate_remote" in
t) git-update-ref HEAD "$head_sha1" ;;
- *) git-update-ref "refs/$origin" $(git-rev-parse HEAD)
+ *) git-update-ref "refs/$origin" $(git-rev-parse HEAD) ;;
esac &&
(cd "$GIT_DIR/$remote_top" && find . -type f -print) |
while read dotslref
test "$head_points_at" = "$name" ||
test "$origin" = "$head" ||
echo "Pull: refs/heads/${name}:$remote_top/${name}"
- done >>"$GIT_DIR/remotes/$origin"
+ done >>"$GIT_DIR/remotes/$origin" &&
+ case "$use_separate_remote" in
+ t)
+ rm -f "refs/remotes/$origin/HEAD"
+ git-symbolic-ref "refs/remotes/$origin/HEAD" \
+ "refs/remotes/$origin/$head_points_at"
+ esac
esac
case "$no_checkout" in