mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-02 14:37:30 +00:00
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>
This commit is contained in:
parent
88183c1988
commit
28c3beaa59
@ -250,8 +250,10 @@ static int update_head_to_remote(git_repository *repo, git_remote *remote)
|
||||
|
||||
goto cleanup;
|
||||
} 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:
|
||||
|
Loading…
Reference in New Issue
Block a user