Merge pull request #528 from libgit2/cmn/bump-libgit2
Bump libgit2 to 6777db8e83
This commit is contained in:
commit
ba1b5f0c23
|
@ -1,10 +1,9 @@
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.7
|
- "1.11"
|
||||||
- 1.8
|
- "1.12"
|
||||||
- 1.9
|
- "1.13"
|
||||||
- "1.10"
|
|
||||||
- tip
|
- tip
|
||||||
|
|
||||||
script: make test-static
|
script: make test-static
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -2,7 +2,7 @@ default: test
|
||||||
|
|
||||||
test: build-libgit2
|
test: build-libgit2
|
||||||
go run script/check-MakeGitError-thread-lock.go
|
go run script/check-MakeGitError-thread-lock.go
|
||||||
go test ./...
|
go test --count=1 ./...
|
||||||
|
|
||||||
install: build-libgit2
|
install: build-libgit2
|
||||||
go install ./...
|
go install ./...
|
||||||
|
@ -15,4 +15,4 @@ install-static: build-libgit2
|
||||||
|
|
||||||
test-static: build-libgit2
|
test-static: build-libgit2
|
||||||
go run script/check-MakeGitError-thread-lock.go
|
go run script/check-MakeGitError-thread-lock.go
|
||||||
go test --tags "static" ./...
|
go test --count=1 --tags "static" ./...
|
||||||
|
|
|
@ -2,6 +2,9 @@ package git
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#include <git2.h>
|
#include <git2.h>
|
||||||
|
#include <git2/sys/cred.h>
|
||||||
|
|
||||||
|
git_credtype_t _go_git_cred_credtype(git_cred *cred);
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
@ -27,7 +30,7 @@ func (o *Cred) HasUsername() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Cred) Type() CredType {
|
func (o *Cred) Type() CredType {
|
||||||
return (CredType)(o.ptr.credtype)
|
return (CredType)(C._go_git_cred_credtype(o.ptr))
|
||||||
}
|
}
|
||||||
|
|
||||||
func credFromC(ptr *C.git_cred) *Cred {
|
func credFromC(ptr *C.git_cred) *Cred {
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1 +1,3 @@
|
||||||
module github.com/libgit2/git2go
|
module github.com/libgit2/git2go
|
||||||
|
|
||||||
|
go 1.13
|
||||||
|
|
4
merge.go
4
merge.go
|
@ -132,7 +132,7 @@ func (mo *MergeOptions) toC() *C.git_merge_options {
|
||||||
}
|
}
|
||||||
return &C.git_merge_options{
|
return &C.git_merge_options{
|
||||||
version: C.uint(mo.Version),
|
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),
|
rename_threshold: C.uint(mo.RenameThreshold),
|
||||||
target_limit: C.uint(mo.TargetLimit),
|
target_limit: C.uint(mo.TargetLimit),
|
||||||
file_favor: C.git_merge_file_favor_t(mo.FileFavor),
|
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.our_label = C.CString(options.OurLabel)
|
||||||
c.their_label = C.CString(options.TheirLabel)
|
c.their_label = C.CString(options.TheirLabel)
|
||||||
c.favor = C.git_merge_file_favor_t(options.Favor)
|
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)
|
c.marker_size = C.ushort(options.MarkerSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
odb.go
2
odb.go
|
@ -221,7 +221,7 @@ func (v *Odb) NewWriteStream(size int64, otype ObjectType) (*OdbWriteStream, err
|
||||||
runtime.LockOSThread()
|
runtime.LockOSThread()
|
||||||
defer runtime.UnlockOSThread()
|
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)
|
runtime.KeepAlive(v)
|
||||||
if ret < 0 {
|
if ret < 0 {
|
||||||
return nil, MakeGitError(ret)
|
return nil, MakeGitError(ret)
|
||||||
|
|
2
stash.go
2
stash.go
|
@ -171,7 +171,7 @@ func (opts *StashApplyOptions) toC() (
|
||||||
|
|
||||||
optsC = &C.git_stash_apply_options{
|
optsC = &C.git_stash_apply_options{
|
||||||
version: C.GIT_STASH_APPLY_OPTIONS_VERSION,
|
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)
|
populateCheckoutOpts(&optsC.checkout_options, &opts.CheckoutOptions)
|
||||||
if opts.ProgressCallback != nil {
|
if opts.ProgressCallback != nil {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 08cfa43d0e1a9214a2f1239593686078e75e5636
|
Subproject commit 6777db8e8343014d57c41b335e0c60af44d4e9f2
|
|
@ -2,6 +2,7 @@
|
||||||
#include <git2.h>
|
#include <git2.h>
|
||||||
#include <git2/sys/odb_backend.h>
|
#include <git2/sys/odb_backend.h>
|
||||||
#include <git2/sys/refdb_backend.h>
|
#include <git2/sys/refdb_backend.h>
|
||||||
|
#include <git2/sys/cred.h>
|
||||||
|
|
||||||
typedef int (*gogit_submodule_cbk)(git_submodule *sm, const char *name, void *payload);
|
typedef int (*gogit_submodule_cbk)(git_submodule *sm, const char *name, void *payload);
|
||||||
|
|
||||||
|
@ -180,4 +181,8 @@ void _go_git_writestream_free(git_writestream *stream)
|
||||||
stream->free(stream);
|
stream->free(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git_credtype_t _go_git_cred_credtype(git_cred *cred) {
|
||||||
|
return cred->credtype;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in New Issue