diff options
author | Keith Dahlby <dahlbyk@gmail.com> | 2012-11-04 12:13:42 -0600 |
---|---|---|
committer | Keith Dahlby <dahlbyk@gmail.com> | 2012-11-04 12:13:42 -0600 |
commit | 35d255fda66abffc58d2c7a847aa86840727b4a0 (patch) | |
tree | 8fe97df59c56cf307c6065e1daca5b826ca9df95 | |
parent | 1e99ce9ac7d7a73f629327d020034e4b2ed1374c (diff) | |
download | libgit2-35d255fda66abffc58d2c7a847aa86840727b4a0.tar.gz |
repo: fix state when HEAD is not detached
-rw-r--r-- | src/repository.c | 3 | ||||
-rw-r--r-- | tests-clar/repo/state.c | 2 |
2 files changed, 0 insertions, 5 deletions
diff --git a/src/repository.c b/src/repository.c index 0e416e0b8..fbae8935b 100644 --- a/src/repository.c +++ b/src/repository.c @@ -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; diff --git a/tests-clar/repo/state.c b/tests-clar/repo/state.c index c0aba1987..5a0a5f360 100644 --- a/tests-clar/repo/state.c +++ b/tests-clar/repo/state.c @@ -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) |