Update to libgit2 4c02d3937
This commit is contained in:
parent
a4d5118374
commit
b374e16db8
10
merge.go
10
merge.go
|
@ -84,8 +84,8 @@ const (
|
|||
)
|
||||
|
||||
type MergeOptions struct {
|
||||
Version uint
|
||||
Flags MergeTreeFlag
|
||||
Version uint
|
||||
TreeFlags MergeTreeFlag
|
||||
|
||||
RenameThreshold uint
|
||||
TargetLimit uint
|
||||
|
@ -97,7 +97,7 @@ type MergeOptions struct {
|
|||
func mergeOptionsFromC(opts *C.git_merge_options) MergeOptions {
|
||||
return MergeOptions{
|
||||
Version: uint(opts.version),
|
||||
Flags: MergeTreeFlag(opts.flags),
|
||||
TreeFlags: MergeTreeFlag(opts.tree_flags),
|
||||
RenameThreshold: uint(opts.rename_threshold),
|
||||
TargetLimit: uint(opts.target_limit),
|
||||
FileFavor: MergeFileFavor(opts.file_favor),
|
||||
|
@ -123,7 +123,7 @@ func (mo *MergeOptions) toC() *C.git_merge_options {
|
|||
}
|
||||
return &C.git_merge_options{
|
||||
version: C.uint(mo.Version),
|
||||
flags: C.git_merge_tree_flag_t(mo.Flags),
|
||||
tree_flags: C.git_merge_tree_flag_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),
|
||||
|
@ -333,7 +333,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_flags_t(options.Flags)
|
||||
c.flags = C.uint(options.Flags)
|
||||
}
|
||||
|
||||
func freeCMergeFileOptions(c *C.git_merge_file_options) {
|
||||
|
|
|
@ -616,16 +616,19 @@ func (v *Repository) RemoveNote(ref string, author, committer *Signature, id *Oi
|
|||
|
||||
// DefaultNoteRef returns the default notes reference for a repository
|
||||
func (v *Repository) DefaultNoteRef() (string, error) {
|
||||
var ptr *C.char
|
||||
buf := C.git_buf{}
|
||||
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
|
||||
if ret := C.git_note_default_ref(&ptr, v.ptr); ret < 0 {
|
||||
if ret := C.git_note_default_ref(&buf, v.ptr); ret < 0 {
|
||||
return "", MakeGitError(ret)
|
||||
}
|
||||
|
||||
return C.GoString(ptr), nil
|
||||
ret := C.GoString(buf.ptr)
|
||||
C.git_buf_free(&buf)
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
type RepositoryState int
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d675982a15388d8c413acda139b4662062cf3286
|
||||
Subproject commit 4c02d393748d0db382450871ad9ef6898a2ce360
|
Loading…
Reference in New Issue