summaryrefslogtreecommitdiff
path: root/odb_test.go
AgeCommit message (Collapse)Author
2021-09-05The big Callback type adjustment of 2020lhchavez
This change makes all callbacks that can fail return an `error`. This makes things a lot more idiomatic.
2021-02-15fix: Use `err` instead of error as a variable name for errors (#746)Suhaib Mujahid
fix #745
2020-12-05Mark some symbols to be deprecated #minor (#698)lhchavez
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
2020-02-23Add odb.NewOdbBackendLoose()lhchavez
This change adds support for odb.NewOdbBackendLoose(). This, together with the git.Packbuilder, can do what Mempack does with a lot less memory.
2020-02-23Add support for indexers and alternate odb packfileslhchavez
This allows for implementations of git servers written in Go.
2019-01-03Merge pull request #447 from walkenzoy/masterCarlos Martín Nieto
git2go: small fixes to odb module
2018-12-28Add some testslhchavez
This should prevent regressions in the future.
2018-07-03git2go: small fixes to odb moduleMichel Lespinasse
- 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()
2016-08-27Run the tests in parallelCarlos Martín Nieto
This saves about 1s, or 1/3 of the test runtime. The linking is still much slower, but this we can control.
2016-02-03Expose git_odb_read_header as Odb.ReadHeader.Han-Wen Nienhuys
This function is much faster for discovering sizes for a given OID.
2015-06-08Update to libgit2 b6011e29Carlos Martín Nieto
2015-05-22odb: use HandleList for C function callbacks.Patrick Steinhardt
2015-04-24tests: always clean up temporary repository dirsPatrick Steinhardt
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-03-04go fmtMark Probst
2014-05-06Odb: use a callback instead of a channel for ForEachCarlos Martín Nieto
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-03-19Oid: make NewOid take a stringCarlos Martín Nieto
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-01-25Test for Odb hash function.Claudiu-Vlad Ursache
2013-09-22Remove leftover reference to old constCarlos Martín Nieto
2013-09-11Wrap the odb streamsCarlos Martín Nieto
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.