Commit 28c3beaa by Frank Li

Fix fail clone local repo which head detatched

Set head detach if can't found branch after download

Signed-off-by: Frank Li <lznuaa@gmail.com>
parent 88183c19
...@@ -250,8 +250,10 @@ static int update_head_to_remote(git_repository *repo, git_remote *remote) ...@@ -250,8 +250,10 @@ static int update_head_to_remote(git_repository *repo, git_remote *remote)
goto cleanup; goto cleanup;
} else { } else {
/* TODO: What should we do if nothing has been found? retcode = git_repository_set_head_detached(
*/ repo,
&head_info.remote_head_oid);
goto cleanup;
} }
cleanup: cleanup:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment