summaryrefslogtreecommitdiff
path: root/git.go
AgeCommit message (Collapse)Author
2019-01-03Merge pull request #432 from josharian/simplify-oidCarlos Martín Nieto
git: simplify some Oid methods
2018-08-08Remove uses of deprecated git_buf_freeCarlos Martín Nieto
2018-02-15git: simplify some Oid methodsJosh Bleecher Snyder
2017-07-08Second round of keep-alivesCarlos Martín Nieto
2017-04-14Allow building statically via the "static" build tagCarlos Martín Nieto
2017-04-13Merge pull request #332 from ezwiebel/rebase-wrapperCarlos Martín Nieto
Rebase wrapper
2016-11-19Update to 0.25-rc1Carlos Martín Nieto
2016-11-01Took @carlosmn PR review into accountezwiebel
2016-11-01Get rid of the with-static.sh scriptCarlos Martín Nieto
CGO can perform variable substitution in the directives, so we don't need to use a script to set up the variables; we can let the go tool do it for us.
2016-10-31Panic if libgit2 is not thread-awareCarlos Martín Nieto
Go calling C is inherently multi-threaded. If libgit2 cannot handle threading, then we're going to crash at some random point. Crash right at the start so we know what's happening.
2016-08-27Also remove a pkg-config directive that snuck inCarlos Martín Nieto
2016-04-27Error out if we detect an incompatible libgit2 versionCarlos Martín Nieto
The master version supports only v0.24 so let's enforce that via the compiler.
2016-03-07Merge branch 'next'Carlos Martín Nieto
2015-10-26Update libgit2 to 821131fCalin Seciu
The API changes are: - `*Remote.Connect` ```go // from: func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks) error // to: func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks, headers []string) error ``` - `*Remote.ConnectFetch` - `headers` was added as above - `*Remote.ConnectPush` - `headers` was added as above
2015-08-31Merge branch 'next'Carlos Martín Nieto
2015-06-28Merge remote-tracking branch 'upstream/master' into nextCarlos Martín Nieto
Conflicts: branch.go
2015-06-08Update to libgit2 b6011e29Carlos Martín Nieto
2015-06-08Merge remote-tracking branch 'origin/master' into nextCarlos Martín Nieto
2015-06-07Add error code matching GIT_EAUTH for authentication failuresMike Edgar
2015-05-22Introduce an indirection layer for pointersCarlos Martín Nieto
As the Go runtime can move stacks at any point and the C code runs concurrently with the rest of the system, we cannot assume that the payloads we give to the C code will stay valid for any particular duration. We must therefore give the C code handles which we can then look up in our own list when the callbacks get called.
2015-01-14Link dynamically to libgit2Carlos Martín Nieto
With libgit2 v0.22 released, we can expect its API and ABI to remain stable when installed on the system. Linking dynamically allows us to use the go tool alone to build and install the package.
2015-01-04Update to libgit2 masterCarlos Martín Nieto
This gets rid of the Push object. All network now goes through the Remote object.
2014-12-31Revert "Make the cgo tool do more linking work"Carlos Martín Nieto
2014-12-27Make the cgo tool do more linking workCarlos Martín Nieto
The cgo directives let us do a lot more than I previously thought, so we can use this to make the building process of git2go go through the go tool directly rather than via the script. libgit2 still needs to be built manually, so we do still require make, but only for building libgit2. Once that's built, any modifications to git2go's own code can be built with go build
2014-12-11Remove useless includesCarlos Martín Nieto
2014-12-03Update to masterCarlos Martín Nieto
2014-10-28Make the constants have typesCarlos Martín Nieto
While Go will assign the correct type to a const block when it auto-creates the values, assigning makes the const be typeless and will only gain it in each particular use. Make each constant in the blocks have an assigned type.
2014-06-07Really build staticallyCarlos Martín Nieto
2014-06-03Switch default to static linkingCarlos Martín Nieto
Build in libgit2 statically into git2go by default, removing the need for the right version to be available as a shared object. We do still need to link dynamically against OpenSSL and LibSSH2.
2014-04-26Merge commit 'refs/pull/72/head' of github.com:libgit2/git2goCarlos Martín Nieto
Conflicts: git.go wrapper.c
2014-04-04Merge remote-tracking branch 'libgit/master' into add-basic-diff-patchJesse Ezell
2014-04-04adjust comments on error messages to standard godoc styleJesse Ezell
2014-04-02make it possible to handle errorsJesse Ezell
2014-03-25Add a settings packageCarlos Martín Nieto
This lets us modify the libgit2-wide options/settings.
2014-03-20merge with latestJesse Ezell
2014-03-20cleanup and refactor diff / patchJesse Ezell
2014-03-19Oid: fix IsZero()Carlos Martín Nieto
We need to compare against the number zero, not its ASCII value.
2014-03-19Oid: use Go's conversion functionsCarlos Martín Nieto
Go already has all the necessary pieces for encoding and decoding hex strings. Using them let's us avoid going into C land. Benchmarks show this takes about half the time as using libgit2's functions.
2014-03-19Oid: remove Bytes()Carlos Martín Nieto
This is not needed. We can do id[:] to get a slice.
2014-03-19Oid: make NewOid take a stringCarlos Martín Nieto
This is the most common way of having an id that's not in Oid form, so let's make it the "default" and rename to NewOidFromBytes() the one that takes []byte.
2014-03-19Oid: make the type directly [20]byteCarlos Martín Nieto
There is no need for a struct with a single field. An Oid is 20 bytes which hold the binary representation of the hash, so let's use that directly. Go lets us have methods on this new type just the same.
2014-02-26merge latest, cleanup error handling, add thread locksJesse Ezell
2014-02-26Added git error code to the error object.Jesper Hansen
2014-02-23Merge commit 'refs/pull/53/head' of github.com:libgit2/git2goCarlos Martín Nieto
On top: fix git_buf handling and rename signature This fixes #57, #54. Conflicts: git.go reference.go repository.go submodule.go
2014-01-29update git2go to support latest libgit2 development commit (id: 66af84)Aidan Nulman
2014-01-04work in progress wrapping git_cloneJason Toffaletti
2013-12-18Lock the OS thread when acessing errorsCarlos Martín Nieto
The library stores error information in thread-local storage, which means we need to make sure that the Go runtime doesn't switch OS threads between the time we call a function and th time we attempt to retrieve the error information.
2013-06-17Packbuilder: compilation fixesCarlos Martín Nieto
Don't name the return values, as they conflict with the names we want inside and the types don't match what we want to have inside. We need them to be two-way channels in the function, and then pass unidirectional references to the different functions.
2013-06-13Merge pull request #25 from carlosmn/error-nilVicent Martí
Catch nil error instances
2013-06-13Merge pull request #26 from carlosmn/ref-iterVicent Martí
Implement a reference iterator