mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 00:43:41 +00:00
repo: fix state when HEAD is not detached
This commit is contained in:
parent
1e99ce9ac7
commit
35d255fda6
@ -1552,9 +1552,6 @@ int git_repository_state(git_repository *repo)
|
||||
|
||||
assert(repo);
|
||||
|
||||
if (!git_repository_head_detached(repo))
|
||||
return state;
|
||||
|
||||
if (git_buf_puts(&repo_path, repo->path_repository) < 0)
|
||||
return -1;
|
||||
|
||||
|
@ -23,8 +23,6 @@ static void setup_simple_state(const char *filename)
|
||||
cl_git_pass(git_buf_joinpath(&_path, git_repository_path(_repo), filename));
|
||||
git_futils_mkpath2file(git_buf_cstr(&_path), 0777);
|
||||
cl_git_mkfile(git_buf_cstr(&_path), "dummy");
|
||||
|
||||
cl_git_pass(git_repository_detach_head(_repo));
|
||||
}
|
||||
|
||||
static void assert_repo_state(git_repository_state_t state)
|
||||
|
Loading…
Reference in New Issue
Block a user