Compare commits

...

3 Commits

Author SHA1 Message Date
hyung-hwan 4b90e82028 more libgit2 version diff handled 2026-06-22 22:39:28 +09:00
hyung-hwan d175c77686 fixed a version check when including git2/sys/errors.h 2026-06-22 22:27:04 +09:00
hyung-hwan 417e82b6c5 renamed the module name 2026-06-22 21:49:40 +09:00
3 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
module github.com/libgit2/git2go/v34
//module github.com/libgit2/git2go/v34
module git2go
go 1.13
+8 -1
View File
@@ -6,6 +6,10 @@ package git
#include <git2.h>
#include <git2/sys/cred.h>
static void set_update_fetchhead(git_fetch_options *opts, int v) {
opts->update_fetchhead = v;
}
extern void _go_git_populate_remote_callbacks(git_remote_callbacks *callbacks);
*/
import "C"
@@ -983,7 +987,10 @@ func populateFetchOptions(copts *C.git_fetch_options, opts *FetchOptions, errorT
}
populateRemoteCallbacks(&copts.callbacks, &opts.RemoteCallbacks, errorTarget)
copts.prune = C.git_fetch_prune_t(opts.Prune)
copts.update_fetchhead = ucbool(opts.UpdateFetchhead)
// use the helper. the update_fetchhead is signed on libgit2 1.5 but unsigined on 1.9
//copts.update_fetchhead = ucbool(opts.UpdateFetchhead)
C.set_update_fetchhead(copts, C.int(ucbool(opts.UpdateFetchhead)))
copts.download_tags = C.git_remote_autotag_option_t(opts.DownloadTags)
copts.custom_headers = C.git_strarray{
+2
View File
@@ -4,7 +4,9 @@
#include <git2/sys/odb_backend.h>
#include <git2/sys/refdb_backend.h>
#include <git2/sys/cred.h>
#if (LIBGIT2_VER_MAJOR > 1) || (LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 9)
#include <git2/sys/errors.h>
#endif
// There are two ways in which to declare a callback:
//