Skip to content

Commit f91f170

Browse files
author
Edward Thomson
authored
Merge pull request libgit2#4032 from libgit2/cmn/https-cap-no-hardcode
Don't hard-code HTTPS cap & clarify the meanings of the features enum
2 parents 329ce04 + 77e4623 commit f91f170

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

include/git2/common.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,27 @@ GIT_EXTERN(void) git_libgit2_version(int *major, int *minor, int *rev);
109109
* was compiled
110110
*/
111111
typedef enum {
112+
/**
113+
* If set, libgit2 was built thread-aware and can be safely used from multiple
114+
* threads.
115+
*/
112116
GIT_FEATURE_THREADS = (1 << 0),
117+
/**
118+
* If set, libgit2 was built with and linked against a TLS implementation.
119+
* Custom TLS streams may still be added by the user to support HTTPS
120+
* regardless of this.
121+
*/
113122
GIT_FEATURE_HTTPS = (1 << 1),
123+
/**
124+
* If set, libgit2 was built with and linked against libssh2. A custom
125+
* transport may still be added by the user to support libssh2 regardless of
126+
* this.
127+
*/
114128
GIT_FEATURE_SSH = (1 << 2),
129+
/**
130+
* If set, libgit2 was built with support for sub-second resolution in file
131+
* modification times.
132+
*/
115133
GIT_FEATURE_NSEC = (1 << 3),
116134
} git_feature_t;
117135

src/settings.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ int git_libgit2_features(void)
2929
#ifdef GIT_THREADS
3030
| GIT_FEATURE_THREADS
3131
#endif
32+
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
3233
| GIT_FEATURE_HTTPS
34+
#endif
3335
#if defined(GIT_SSH)
3436
| GIT_FEATURE_SSH
3537
#endif

0 commit comments

Comments
 (0)