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
ebb3c506
Commit
ebb3c506
authored
Mar 03, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
features: Rename `_HAS_` to `_FEATURE_`
parent
2491c416
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
include/git2/common.h
+7
-7
src/settings.c
+3
-3
tests/core/features.c
+6
-6
No files found.
include/git2/common.h
View file @
ebb3c506
...
...
@@ -98,26 +98,26 @@ GIT_EXTERN(void) git_libgit2_version(int *major, int *minor, int *rev);
* was compiled
*/
typedef
enum
{
GIT_
HAS
_THREADS
=
(
1
<<
0
),
GIT_
HAS
_HTTPS
=
(
1
<<
1
),
GIT_
HAS
_SSH
=
(
1
<<
2
),
GIT_
FEATURE
_THREADS
=
(
1
<<
0
),
GIT_
FEATURE
_HTTPS
=
(
1
<<
1
),
GIT_
FEATURE
_SSH
=
(
1
<<
2
),
}
git_feature_t
;
/**
* Query compile time options for libgit2.
*
* @return A combination of GIT_
HAS
_* values.
* @return A combination of GIT_
FEATURE
_* values.
*
* - GIT_
HAS
_THREADS
* - GIT_
FEATURE
_THREADS
* Libgit2 was compiled with thread support. Note that thread support is
* still to be seen as a 'work in progress' - basic object lookups are
* believed to be threadsafe, but other operations may not be.
*
* - GIT_
HAS
_HTTPS
* - GIT_
FEATURE
_HTTPS
* Libgit2 supports the https:// protocol. This requires the openssl
* library to be found when compiling libgit2.
*
* - GIT_
HAS
_SSH
* - GIT_
FEATURE
_SSH
* Libgit2 supports the SSH protocol for network operations. This requires
* the openssh to be found when compiling libgit2
*/
...
...
src/settings.c
View file @
ebb3c506
...
...
@@ -21,13 +21,13 @@ int git_libgit2_features()
{
return
0
#ifdef GIT_THREADS
|
GIT_
HAS
_THREADS
|
GIT_
FEATURE
_THREADS
#endif
#if defined(GIT_SSL) || defined(GIT_WINHTTP)
|
GIT_
HAS
_HTTPS
|
GIT_
FEATURE
_HTTPS
#endif
#if defined(GIT_SSH)
|
GIT_
HAS
_SSH
|
GIT_
FEATURE
_SSH
#endif
;
}
...
...
tests/core/features.c
View file @
ebb3c506
...
...
@@ -12,20 +12,20 @@ void test_core_features__0(void)
caps
=
git_libgit2_features
();
#ifdef GIT_THREADS
cl_assert
((
caps
&
GIT_
HAS
_THREADS
)
!=
0
);
cl_assert
((
caps
&
GIT_
FEATURE
_THREADS
)
!=
0
);
#else
cl_assert
((
caps
&
GIT_
HAS
_THREADS
)
==
0
);
cl_assert
((
caps
&
GIT_
FEATURE
_THREADS
)
==
0
);
#endif
#if defined(GIT_SSL) || defined(GIT_WINHTTP)
cl_assert
((
caps
&
GIT_
HAS
_HTTPS
)
!=
0
);
cl_assert
((
caps
&
GIT_
FEATURE
_HTTPS
)
!=
0
);
#else
cl_assert
((
caps
&
GIT_
HAS
_HTTPS
)
==
0
);
cl_assert
((
caps
&
GIT_
FEATURE
_HTTPS
)
==
0
);
#endif
#if defined(GIT_SSH)
cl_assert
((
caps
&
GIT_
HAS
_SSH
)
!=
0
);
cl_assert
((
caps
&
GIT_
FEATURE
_SSH
)
!=
0
);
#else
cl_assert
((
caps
&
GIT_
HAS
_SSH
)
==
0
);
cl_assert
((
caps
&
GIT_
FEATURE
_SSH
)
==
0
);
#endif
}
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