summaryrefslogtreecommitdiff
path: root/git.go
AgeCommit message (Collapse)Author
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
2013-05-23Implement a reference iteratorCarlos Martín Nieto
Wrap the reference iterators, and provide a Iter() function to get them through a channel.
2013-05-21Implement ShortenOidsAxel Wagner
2013-05-21Catch nil error instancesCarlos Martín Nieto
Unfortunately libgit2 sometimes returns an error without setting an error message. Provide an alternative message instead of trying to dereference nil.
2013-05-17Use cbool-helper in Discover()Axel Wagner
2013-05-14Implement git_repository_discoverAxel Wagner
2013-04-26Implement most of the oid_-functions as MethodsAxel Wagner
2013-03-08Oid: make sure not to dereference a NULL git_oidCarlos Martín Nieto
Some calls like Reference.Target() can return NULL if the reference is symbolic. Make sure newOidFromC() can handle these situations.
2013-03-05Initial commitVicent Marti