Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
065be7a1
Commit
065be7a1
authored
Nov 05, 2012
by
Russell Belfer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1044 from dahlbyk/repo/state
Fix state when HEAD is not detached
parents
942a7698
221ee54b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
6 deletions
+1
-6
README.md
+1
-1
src/repository.c
+0
-3
tests-clar/repo/state.c
+0
-2
No files found.
README.md
View file @
065be7a1
...
...
@@ -70,7 +70,7 @@ The following CMake variables are declared:
-
`LIB_INSTALL_DIR`
: Where to install libraries to.
-
`INCLUDE_INSTALL_DIR`
: Where to install headers to.
-
`BUILD_SHARED_LIBS`
: Build libgit2 as a Shared Library (defaults to ON)
-
`BUILD_CLAR`
: Build
[
Clar
](
https://github.com/
tanoku
/clar
)
-based test suite (defaults to ON)
-
`BUILD_CLAR`
: Build
[
Clar
](
https://github.com/
vmg
/clar
)
-based test suite (defaults to ON)
-
`THREADSAFE`
: Build libgit2 with threading support (defaults to OFF)
Language Bindings
...
...
src/repository.c
View file @
065be7a1
...
...
@@ -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
;
...
...
tests-clar/repo/state.c
View file @
065be7a1
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment