| Age | Commit message (Collapse) | Author |
|
This adds IsBinary() func to Blob struct, which simply returns the result of git_blob_is_binary function.
Refs: https://libgit2.org/libgit2/#HEAD/group/blob/git_blob_is_binary
Issue: Add support for git_blob_is_binary #426
Fixes: #426
|
|
|
|
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.
|
|
|
|
|
|
It depends heavily on the expression at the call site an whether it can
figure out whether we're using a slice or not, so provid an incantation
that does this.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
Go won't let us access the zeroth alement of an empty slice, so we need
to figure out if the length is zero and take special action.
This fixes #106.
|
|
It does not like breaking aliasing rules, so let's keep a casted pointer
for when libgit2 wants that.
|
|
|
|
API cleanup
|
|
This is only needed once per package. Having it on every file makes the
build system ask about it n times, which is silly.
|
|
|
|
|
|
|
|
Provide a manual way of freeing objects, but set finalizers for them
in case the user does not want to worry about memory management, which
would be useful for commits or trees, which sare typically small.
When the objects are freed manually, the finalizer is unset to avoid
double-freeing, mimicking what the go runtime does.
|
|
|