Compare commits
3 Commits
eb09776b38
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b90e82028 | |||
| d175c77686 | |||
| 417e82b6c5 |
@@ -1,4 +1,5 @@
|
||||
module github.com/libgit2/git2go/v34
|
||||
//module github.com/libgit2/git2go/v34
|
||||
module git2go
|
||||
|
||||
go 1.13
|
||||
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user