This change adds support for git smart transports. This will be then
used to implement http, https, and ssh transports that don't rely on the
libgit2 library.
(cherry picked from commit f1fa96c7b7)
This change makes all non-user-creatable structures non-comparable. This
makes it easier to add changes later that don't introduce breaking
changes from the go compatibility guarantees perspective.
This, of course, implies that this change _is_ a breaking change, but since
these structures are not intended to be created by users (or de-referenced),
it should be okay.
(cherry picked from commit dbe032c347)
This change adds the wrapper for `git_commit_create_with_signature`.
(cherry picked from commit 15434610fe)
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
This commit adds the Go binding for `git_commit_create_buffer`. This
will be used to support the 1.2.0 commit create callback.
(cherry picked from commit fbaf9d1d1a)
add wrapper for `git_repository_item_path`
(cherry picked from commit a4d202ed7b)
Co-authored-by: Vladimir Buzuev <44682889+vladimir-buzuev@users.noreply.github.com>
This change makes sure that pointer handles are correctly cleaned up
during tests.
(cherry picked from commit e28cce87c7)
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
While we already have wrappers for `git_object_lookup`, there are none
yet for the prefixed variant where only the first n bytes of the OID are
used for the lookup. This commit adds them.
(cherry picked from commit 37b81b61f1)
Co-authored-by: Patrick Steinhardt <ps@pks.im>
`repository.LookupXxx()` allocate new go `Object`s that have a reference
to a `C.git_object`. Those are then duplicated with `git_object_dup()`,
so the original `Object`s linger unnecessarily until the Go GC kicks in.
This change explicitly calls `Free()` on the originals to avoid
unnecessary accumulation of garbage.
(cherry picked from commit 2bb5930733)
As it seems to be something that many people can't get over, reformat
all the files; as we're breaking things, whoever depended on 'next' will
have to take many changes into account anyway, so let's include this to
reduce the noise of incoming patches.
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.
There's been some changes to the checkout strategy, especially the
SAFE_CREATE mode, which is now the RECREATE_MISSING flag, though that
shouldn't be necessary to use in the general case.
The largest changes come from the removal of the signture from
ref-modifying functions/methods and the removal of the reflog string in
all but those directly related to moving references.