From 1fabe95fb7275df980ff6ab03fb85eac91c5849d Mon Sep 17 00:00:00 2001 From: nmeum Date: Sat, 28 Nov 2020 20:10:34 +0100 Subject: Relax libgit2 minor version check (#696) The major version must still be an exact match since libgit2 uses semantic versioning and changes to the major number indicate backwards incompatible changes to the API. Fixes: #695 --- git_system_dynamic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git_system_dynamic.go') diff --git a/git_system_dynamic.go b/git_system_dynamic.go index 571a77f..3013804 100644 --- a/git_system_dynamic.go +++ b/git_system_dynamic.go @@ -7,8 +7,8 @@ package git #cgo CFLAGS: -DLIBGIT2_DYNAMIC #include -#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR != 1 -# error "Invalid libgit2 version; this git2go supports libgit2 v1.1" +#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1 +# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0" #endif */ import "C" -- cgit v1.2.3