diff options
| author | Carlos Martín Nieto <[email protected]> | 2019-12-10 22:15:32 +0000 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2019-12-10 22:15:32 +0000 |
| commit | 97e6392d3ab67bbf3e3e59b86a0bc9ebf7430e98 (patch) | |
| tree | e7e5259914f20617499933cbe7acf53af0fe237e | |
| parent | 790b3d2ac014385a76e858bc21549be50c3ef7c8 (diff) | |
Adjust to libgit2 changes
| -rw-r--r-- | credentials.go | 1 | ||||
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | merge.go | 4 | ||||
| -rw-r--r-- | odb.go | 2 | ||||
| -rw-r--r-- | stash.go | 2 |
5 files changed, 7 insertions, 4 deletions
diff --git a/credentials.go b/credentials.go index 4e42b6e..766619c 100644 --- a/credentials.go +++ b/credentials.go @@ -2,6 +2,7 @@ package git /* #include <git2.h> +#include <git2/sys/cred.h> */ import "C" import "unsafe" @@ -1 +1,3 @@ module github.com/libgit2/git2go + +go 1.13 @@ -132,7 +132,7 @@ func (mo *MergeOptions) toC() *C.git_merge_options { } return &C.git_merge_options{ version: C.uint(mo.Version), - flags: C.git_merge_flag_t(mo.TreeFlags), + flags: C.uint32_t(mo.TreeFlags), rename_threshold: C.uint(mo.RenameThreshold), target_limit: C.uint(mo.TargetLimit), file_favor: C.git_merge_file_favor_t(mo.FileFavor), @@ -394,7 +394,7 @@ func populateCMergeFileOptions(c *C.git_merge_file_options, options MergeFileOpt c.our_label = C.CString(options.OurLabel) c.their_label = C.CString(options.TheirLabel) c.favor = C.git_merge_file_favor_t(options.Favor) - c.flags = C.git_merge_file_flag_t(options.Flags) + c.flags = C.uint32_t(options.Flags) c.marker_size = C.ushort(options.MarkerSize) } @@ -221,7 +221,7 @@ func (v *Odb) NewWriteStream(size int64, otype ObjectType) (*OdbWriteStream, err runtime.LockOSThread() defer runtime.UnlockOSThread() - ret := C.git_odb_open_wstream(&stream.ptr, v.ptr, C.git_off_t(size), C.git_object_t(otype)) + ret := C.git_odb_open_wstream(&stream.ptr, v.ptr, C.git_object_size_t(size), C.git_object_t(otype)) runtime.KeepAlive(v) if ret < 0 { return nil, MakeGitError(ret) @@ -171,7 +171,7 @@ func (opts *StashApplyOptions) toC() ( optsC = &C.git_stash_apply_options{ version: C.GIT_STASH_APPLY_OPTIONS_VERSION, - flags: C.git_stash_apply_flags(opts.Flags), + flags: C.uint32_t(opts.Flags), } populateCheckoutOpts(&optsC.checkout_options, &opts.CheckoutOptions) if opts.ProgressCallback != nil { |
