Commit Graph

17 Commits

Author SHA1 Message Date
github-actions[bot] 6f19ef8843
fix: Use `err` instead of error as a variable name for errors (#746) (#749)
fix #745

(cherry picked from commit f6c5753df8)

Co-authored-by: Suhaib Mujahid <suhaibmujahid@gmail.com>
2021-02-15 13:57:38 -08:00
lhchavez 5f0640baed
Mark some symbols to be deprecated #minor (#698) (#702)
This change introduces the file deprecated.go, which contains any
constants, functions, and types that are slated to be deprecated in the
next major release.

These symbols are deprecated because they refer to old spellings in
pre-1.0 libgit2. This also makes the build be done with the
`-DDEPRECATE_HARD` flag to avoid regressions.

This, together with
[gorelease](https://godoc.org/golang.org/x/exp/cmd/gorelease)[1] should
make releases safer going forward.

1: More information about how that works at
   https://go.googlesource.com/exp/+/refs/heads/master/apidiff/README.md
(cherry picked from commit 137c05e802)
2020-12-05 13:12:04 -08:00
lhchavez 395b2a90a4 Add odb.NewOdbBackendLoose()
This change adds support for odb.NewOdbBackendLoose(). This, together
with the git.Packbuilder, can do what Mempack does with a lot less
memory.

(cherry picked from commit 91946a5705)
2020-08-16 07:19:09 -07:00
lhchavez 5acb58e83d Add support for indexers and alternate odb packfiles
This allows for implementations of git servers written in Go.

(cherry picked from commit 05bc5e36ff)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto 13d16e7ac5 Merge pull request #447 from walkenzoy/master
git2go: small fixes to odb module
(cherry picked from commit fc1230ba16)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto c74ce46055 Merge pull request #470 from lhchavez/fix-odbreadstream-read
Return io.EOF on OdbReadStream.Read()

(cherry picked from commit 7e9128bd58)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto e55c00eca7 Run the tests in parallel
This saves about 1s, or 1/3 of the test runtime. The linking is still
much slower, but this we can control.
2016-08-27 19:21:05 +02:00
Han-Wen Nienhuys 773ac24a16 Expose git_odb_read_header as Odb.ReadHeader.
This function is much faster for discovering sizes for a given OID.
2016-02-03 15:56:39 +01:00
Carlos Martín Nieto 36e0a256fe Update to libgit2 b6011e29 2015-06-08 04:11:21 +02:00
Patrick Steinhardt e919653755 odb: use HandleList for C function callbacks. 2015-05-22 09:02:24 +02:00
Patrick Steinhardt e300945a3d tests: always clean up temporary repository dirs
Some test repositories are not correctly removed after the tests
did run. Fix by introducing a function that is to be used for
cleaning up temporary test repositories.
2015-04-24 13:01:51 +02:00
Mark Probst 45d88ca5f4 go fmt 2015-03-04 15:52:59 -08:00
Carlos Martín Nieto 2594f3f889 Odb: use a callback instead of a channel for ForEach
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.
2014-05-06 14:19:34 +02:00
Carlos Martín Nieto c9c7c1e779 Oid: make NewOid take a string
This is the most common way of having an id that's not in Oid form, so
let's make it the "default" and rename to NewOidFromBytes() the one that
takes []byte.
2014-03-19 03:56:50 +01:00
Claudiu-Vlad Ursache 53f2ebce5f Test for Odb hash function. 2014-01-25 22:18:43 +01:00
Carlos Martín Nieto f583ad8abd Remove leftover reference to old const 2013-09-22 00:05:37 +02:00
Carlos Martín Nieto 621397026c Wrap the odb streams
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.
2013-09-11 19:25:40 +02:00