| Age | Commit message (Collapse) | Author |
|
|
|
We do want to be able to accept generic objects in functions. Add this interface
so we can accept that instead of specific object types.
|
|
|
|
|
|
An Object should be about representing a libgit2 object rather than
showing which methods it should support.
Change any return of Object to *Object and provide methods to convert
between this and the particular type.
|
|
Includes support for 'git_object_peel'.
|
|
|
|
|
|
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.
|
|
|
|
Otherwise, the garbage collector might decide it's a good idea to throw
away the repository instance while the C object still has a pointer to
it. Hilarity ensues.
|
|
This reduces the need to carry around a pointer to the repository as
well as the objects.
|
|
It does not like breaking aliasing rules, so let's keep a casted pointer
for when libgit2 wants that.
|
|
|
|
This is only needed once per package. Having it on every file makes the
build system ask about it n times, which is silly.
|
|
Make the names look more like what you'd expect from Go.
|
|
Define the object type values as constants
|
|
Give gitObject.Free a pointer-receiver
|
|
This is needed to get runtime.SetFinalizer to work, which
expects a pointer-receiver. Without it the runtime will crash, when it
tries to garbage-collect an object.
|
|
|
|
|
|
|