diff options
Diffstat (limited to 'vendor/github.com/libgit2/git2go/features.go')
-rw-r--r-- | vendor/github.com/libgit2/git2go/features.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/github.com/libgit2/git2go/features.go b/vendor/github.com/libgit2/git2go/features.go new file mode 100644 index 000000000..f6474a061 --- /dev/null +++ b/vendor/github.com/libgit2/git2go/features.go @@ -0,0 +1,30 @@ +package git + +/* +#include <git2.h> +*/ +import "C" + +type Feature int + +const ( + // libgit2 was built with threading support + FeatureThreads Feature = C.GIT_FEATURE_THREADS + + // libgit2 was built with HTTPS support built-in + FeatureHttps Feature = C.GIT_FEATURE_HTTPS + + // libgit2 was build with SSH support built-in + FeatureSsh Feature = C.GIT_FEATURE_SSH + + // libgit2 was built with nanosecond support for files + FeatureNSec Feature = C.GIT_FEATURE_NSEC +) + +// Features returns a bit-flag of Feature values indicating which features the +// loaded libgit2 library has. +func Features() Feature { + features := C.git_libgit2_features() + + return Feature(features) +} |