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
cf81ded6
Commit
cf81ded6
authored
Aug 01, 2012
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #849 from scunz/git_caps
Add function to query for compile time settings.
parents
2340b181
e564e496
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
include/git2/common.h
+23
-0
src/util.c
+12
-0
No files found.
include/git2/common.h
View file @
cf81ded6
...
...
@@ -103,6 +103,29 @@ GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);
*/
GIT_EXTERN
(
void
)
git_libgit2_version
(
int
*
major
,
int
*
minor
,
int
*
rev
);
/**
* Combinations of these values describe the capabilities of libgit2.
*/
enum
{
GIT_CAP_THREADS
=
(
1
<<
0
),
GIT_CAP_HTTPS
=
(
1
<<
1
)
};
/**
* Query compile time options for libgit2.
*
* @return A combination of GIT_CAP_* values.
*
* - GIT_CAP_THREADS
* Libgit2 was compiled with thread support. Note that thread support is still to be seen as a
* 'work in progress'.
*
* - GIT_CAP_HTTPS
* Libgit2 supports the https:// protocol. This requires the open ssl library to be
* found when compiling libgit2.
*/
GIT_EXTERN
(
int
)
git_libgit2_capabilities
(
void
);
/** @} */
GIT_END_DECL
#endif
src/util.c
View file @
cf81ded6
...
...
@@ -22,6 +22,18 @@ void git_libgit2_version(int *major, int *minor, int *rev)
*
rev
=
LIBGIT2_VER_REVISION
;
}
int
git_libgit2_capabilities
()
{
return
0
#ifdef GIT_THREADS
|
GIT_CAP_THREADS
#endif
#ifdef GIT_SSL
|
GIT_CAP_HTTPS
#endif
;
}
void
git_strarray_free
(
git_strarray
*
array
)
{
size_t
i
;
...
...
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