The existing `Commit.Message()` returns the trimmed commit message. In some cases
it is important to retrieve the exact commit message, even if it contains surrounding
newlines.
This adds a new `Commit.RawMessage()` to be able to do that.
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.
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.
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.
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.
It brings the data into go-land so we don't have to worry about the
commit being there. It stores the data we get from git and provides a
Time() function to get a time.Time struct.