Some curl versions lack curl_easy_duphandle()
[gitweb.git] / git-checkout.sh
index 37afcdda309ca8df52bb5033e5e7f0b771dfa067..c3825904b60d36edca96506d7f451cf0349b262d 100755 (executable)
@@ -71,7 +71,8 @@ if [ "$?" -eq 0 ]; then
                echo $new > "$GIT_DIR/refs/heads/$newbranch"
                branch="$newbranch"
        fi
-       [ "$branch" ] && ln -sf "refs/heads/$branch" "$GIT_DIR/HEAD"
+       [ "$branch" ] &&
+       GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD "refs/heads/$branch"
        rm -f "$GIT_DIR/MERGE_HEAD"
 else
        exit 1