diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-03 15:45:36 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-03 15:45:36 -0800 |
commit | 6ddc0964034342519a87fe013781abf31c6db6ad (patch) | |
tree | 74cc863556a42d41e2bf8dec45e6fd33ed312228 /git-clone.sh | |
parent | 235d521da60e4699e5bd59ac658b5b48bd76ddca (diff) | |
parent | 2be8fd085e865097fa0908fe1a94c8edf9cde7f5 (diff) |
GIT 0.99.9cv0.99.9c
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-x | git-clone.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/git-clone.sh b/git-clone.sh index 18e692a67b..c27a913b1d 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -196,10 +196,17 @@ cd $D || exit if test -f ".git/HEAD" then - mkdir -p .git/remotes || exit - echo >.git/remotes/origin \ - "URL: $repo -Pull: master:origin" + head_points_at=`git-symbolic-ref HEAD` + case "$head_points_at" in + refs/heads/*) + head_points_at=`expr "$head_points_at" : 'refs/heads/\(.*\)'` + mkdir -p .git/remotes && + echo >.git/remotes/origin \ + "URL: $repo +Pull: $head_points_at:origin" + cp ".git/refs/heads/$head_points_at" .git/refs/heads/origin + esac + case "$no_checkout" in '') git checkout |