commit | 8eaae73f85dd3df78df80d2dac066eb0866444ae | [log] [tgz] |
---|---|---|
author | Carlos Martín Nieto <cmn@dwim.me> | Wed Apr 27 14:53:21 2016 +0200 |
committer | Carlos Martín Nieto <cmn@dwim.me> | Wed Apr 27 14:53:21 2016 +0200 |
tree | bad07de4da6c433632815e267f43071e0676f771 | |
parent | 95793ac11dbca2f35770c690d9ba7e64d7018815 [diff] |
Error out if we detect an incompatible libgit2 version The master version supports only v0.24 so let's enforce that via the compiler.
diff --git a/git.go b/git.go index 45b01d5..ed891e6 100644 --- a/git.go +++ b/git.go
@@ -4,6 +4,11 @@ #include <git2.h> #include <git2/sys/openssl.h> #cgo pkg-config: libgit2 + +#if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 24 +# error "Invalid libgit2 version; this git2go supports libgit2 v0.24" +#endif + */ import "C" import (