Compare commits

...

22 Commits

Author SHA1 Message Date
Carlos Martín Nieto c9f7fd544d
Merge pull request #473 from libgit2/cmn/bump-v26
Update vendored libgit2 to v0.26.8
2019-01-04 13:49:59 +00:00
Carlos Martín Nieto 0231fb5a68 Update vendored libgit2 to v0.26.8 2019-01-04 13:41:19 +00:00
Carlos Martín Nieto ef5cc6bc29
Merge pull request #458 from libgit2/cmn/bump-v26
Update vendored libgit2 to v0.26.7
2018-10-07 18:59:06 +02:00
Carlos Martín Nieto 2d22de8d7e Update vendored libgit2 to v0.26.7 2018-10-07 18:47:11 +02:00
Carlos Martín Nieto 4f0bb98c94
Merge pull request #451 from libgit2/cmn/bump-libgit2-26
Bump vendored libgit2 to v0.26.6
2018-08-08 12:01:02 +02:00
Carlos Martín Nieto d4a1519215 Bump vendored libgit2 to v0.26.6 2018-08-08 11:37:18 +02:00
Carlos Martín Nieto 1f712c6f96 vendor: really update to libgit2 v0.26.3 2018-03-13 09:00:06 +01:00
Carlos Martín Nieto ca5ecbe9b7 vendor: update to libgit2 v0.26.3 2018-03-12 23:56:13 +01:00
Carlos Martín Nieto 9ec9f647d4 vendor: update to v0.26.2 2018-03-12 23:30:27 +01:00
Carlos Martín Nieto eb0bf21280 travis: don't update submodules recursively
We have invalid submodules for testing and Travis gets unhappy.
2017-09-03 16:20:19 +02:00
Carlos Martín Nieto 30b904902b Merge commit 'refs/pull/402/head' of github.com:libgit2/git2go into v26 2017-09-03 16:11:32 +02:00
Carlos Martín Nieto 1dedb84bde Update vendored libgit2 to a released v0.26 2017-09-03 16:10:10 +02:00
Carlos Martín Nieto f93b2433d5 Update the static version check to v0.26 2017-09-03 16:09:44 +02:00
Mikołaj Baranowski e424134bb6
clone_checkout_strategy removed
https://github.com/libgit2/libgit2/releases/tag/v0.26.0
2017-07-22 20:10:08 +02:00
Carlos Martín Nieto e0c6962c02 Merge pull request #399 from AnalogJ/patch-1
Update git_dynamic.go
2017-07-21 07:00:09 +02:00
Jason Kulatunga 22c1bf8e06 Update git_dynamic.go
this branch should support libgit2 v0.26.0
2017-07-15 12:04:02 -07:00
Carlos Martín Nieto 450e168181 Merge remote-tracking branch 'origin/master' into v26 2017-07-08 22:36:58 +02:00
Carlos Martín Nieto d29ae45d5e Merge remote-tracking branch 'origin/master' into v26
This is a no-op merge to reconcile the differences in the Commit receivers.
2017-07-08 17:21:52 +02:00
Carlos Martín Nieto 0ea4019bdc Merge pull request #394 from libgit2/cmn/keepalive-all-the-things-v26
KeepAlive all the things for v26
2017-07-08 17:04:34 +02:00
Carlos Martín Nieto 76a60dfbeb Third round of keep-alive aditions 2017-07-08 16:53:34 +02:00
Carlos Martín Nieto 7c587b52cf Second round of keep-alives 2017-07-08 16:53:34 +02:00
Carlos Martín Nieto 03c617ab62 First round of mass keep-alive additions 2017-07-08 16:53:31 +02:00
6 changed files with 26 additions and 35 deletions

View File

@ -11,6 +11,12 @@ matrix:
allow_failures:
- go: tip
git:
submodules: false
before_install:
- git submodule update --init
branches:
only:
- master

View File

@ -18,19 +18,15 @@ type Commit struct {
cast_ptr *C.git_commit
}
func (c *Commit) Message() string {
ret := C.GoString(C.git_commit_message(c.cast_ptr))
runtime.KeepAlive(c)
return ret
func (c Commit) Message() string {
return C.GoString(C.git_commit_message(c.cast_ptr))
}
func (c *Commit) RawMessage() string {
ret := C.GoString(C.git_commit_message_raw(c.cast_ptr))
runtime.KeepAlive(c)
return ret
func (c Commit) RawMessage() string {
return C.GoString(C.git_commit_message_raw(c.cast_ptr))
}
func (c *Commit) ExtractSignature() (string, string, error) {
func (c Commit) ExtractSignature() (string, string, error) {
var c_signed C.git_buf
defer C.git_buf_free(&c_signed)
@ -44,7 +40,7 @@ func (c *Commit) ExtractSignature() (string, string, error) {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ret := C.git_commit_extract_signature(&c_signature, &c_signed, repo, oid.toC(), nil)
runtime.KeepAlive(oid)
if ret < 0 {
return "", "", MakeGitError(ret)
} else {
@ -53,20 +49,17 @@ func (c *Commit) ExtractSignature() (string, string, error) {
}
func (c *Commit) Summary() string {
ret := C.GoString(C.git_commit_summary(c.cast_ptr))
runtime.KeepAlive(c)
return ret
func (c Commit) Summary() string {
return C.GoString(C.git_commit_summary(c.cast_ptr))
}
func (c *Commit) Tree() (*Tree, error) {
func (c Commit) Tree() (*Tree, error) {
var ptr *C.git_tree
runtime.LockOSThread()
defer runtime.UnlockOSThread()
err := C.git_commit_tree(&ptr, c.cast_ptr)
runtime.KeepAlive(c)
if err < 0 {
return nil, MakeGitError(err)
}
@ -74,24 +67,18 @@ func (c *Commit) Tree() (*Tree, error) {
return allocTree(ptr, c.repo), nil
}
func (c *Commit) TreeId() *Oid {
ret := newOidFromC(C.git_commit_tree_id(c.cast_ptr))
runtime.KeepAlive(c)
return ret
func (c Commit) TreeId() *Oid {
return newOidFromC(C.git_commit_tree_id(c.cast_ptr))
}
func (c *Commit) Author() *Signature {
func (c Commit) Author() *Signature {
cast_ptr := C.git_commit_author(c.cast_ptr)
ret := newSignatureFromC(cast_ptr)
runtime.KeepAlive(c)
return ret
return newSignatureFromC(cast_ptr)
}
func (c *Commit) Committer() *Signature {
func (c Commit) Committer() *Signature {
cast_ptr := C.git_commit_committer(c.cast_ptr)
ret := newSignatureFromC(cast_ptr)
runtime.KeepAlive(c)
return ret
return newSignatureFromC(cast_ptr)
}
func (c *Commit) Parent(n uint) *Commit {

View File

@ -6,8 +6,8 @@ package git
#include <git2.h>
#cgo pkg-config: libgit2
#if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
# error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
#if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 26
# error "Invalid libgit2 version; this git2go supports libgit2 v0.26"
#endif
*/

View File

@ -9,8 +9,8 @@ package git
#cgo !windows pkg-config: --static ${SRCDIR}/vendor/libgit2/build/libgit2.pc
#include <git2.h>
#if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 25
# error "Invalid libgit2 version; this git2go supports libgit2 v0.25"
#if LIBGIT2_VER_MAJOR != 0 || LIBGIT2_VER_MINOR != 26
# error "Invalid libgit2 version; this git2go supports libgit2 v0.26"
#endif
*/

View File

@ -15,7 +15,6 @@ import (
type SubmoduleUpdateOptions struct {
*CheckoutOpts
*FetchOptions
CloneCheckoutStrategy CheckoutStrategy
}
// Submodule
@ -369,7 +368,6 @@ func populateSubmoduleUpdateOptions(ptr *C.git_submodule_update_options, opts *S
populateCheckoutOpts(&ptr.checkout_opts, opts.CheckoutOpts)
populateFetchOptions(&ptr.fetch_opts, opts.FetchOptions)
ptr.clone_checkout_strategy = C.uint(opts.CloneCheckoutStrategy)
return nil
}

2
vendor/libgit2 vendored

@ -1 +1 @@
Subproject commit df4dfaadcf709646ebab2e57e3589952cf1ac809
Subproject commit 32dc763c116999240440b5054798208d97b4c562