| Age | Commit message (Collapse) | Author |
|
This change exposes the binding for `git_odb_write_multi_pack_index()`.
|
|
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.
|
|
This change:
* Gets rid of the `.toC()` functions for Options objects, since they
were redundant with the `populateXxxOptions()`.
* Adds support for `errorTarget` to the `RemoteOptions`, since they are
used in the same stack for some functions (like `Fetch()`). Now for
those cases, the error returned by the callback will be preserved
as-is.
|
|
This change is a preparation for another change that makes all callback
types return a Go error instead of an error code / an integer. That is
going to make make things a lot more idiomatic.
The reason this change is split is threefold:
a) This change is mostly mechanical and should contain no semantic
changes.
b) This change is backwards-compatible (in the Go API compatibility
sense of the word), and thus can be backported to all other releases.
c) It makes the other change a bit smaller and more focused on just one
thing.
Concretely, this change makes all callbacks populate a Go error when
they fail. If the callback is invoked from the same stack as the
function to which it was passed (e.g. for `Tree.Walk`), it will preserve
the error object directly into a struct that also holds the callback
function. Otherwise if the callback is pased to one func and will be
invoked when run from another one (e.g. for `Repository.InitRebase`),
the error string is saved into the libgit2 thread-local storage and then
re-created as a `GitError`.
|
|
This change adds support for odb.NewOdbBackendLoose(). This, together
with the git.Packbuilder, can do what Mempack does with a lot less
memory.
|
|
This allows for implementations of git servers written in Go.
|
|
|
|
New version is here!
|
|
|
|
git2go: small fixes to odb module
|
|
This change makes OdbReadStream.Read() comply with the usual io.Reader
semantics.
|
|
- Fix couple cgo issues in odb.Write() and odb.Hash(). This is the
same issue - and same solution - as repo.CreateBlobFromBuffer()
used to have.
- Add test for odb.Read()
|
|
|
|
|
|
|
|
argument to be set from different package
|
|
It might be needed when one is writing `git cat-file --batch` equivalent
which has output format
<sha1> SP <type> SP <size> LF
<contents> LF
|
|
|
|
|
|
This function is much faster for discovering sizes for a given OID.
|
|
See http://tip.golang.org/cmd/cgo/#hdr-Passing_pointers .
|
|
These appear to be left over debug statements, and they also look like
they were intended to be fmt.Printf calls anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A channel provides no way to specify whether we stopped sending data
because of an error or because there is no more data.
Therefore, make Odb.ForEach() take a callback with which the user is free to
do whatever they need, letting us return en error.
|
|
|
|
Conflicts:
odb.go
wrapper.c
|
|
|
|
|
|
|
|
Conflicts:
git.go
reference.go
repository.go
submodule.go
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
This is only needed once per package. Having it on every file makes the
build system ask about it n times, which is silly.
|
|
Wrap the odb streams
|
|
Define the object type values as constants
|
|
The interface to these streams should be what you expect from Go, and
both have Write and Close functions so they implement
Reader/ReadCloser and Write/WriteCloser respectively.
|
|
My take on polymorphism
|