Carlos Martín Nieto
97e6392d3a
Adjust to libgit2 changes
2019-12-10 22:15:32 +00:00
lhchavez
5fda6dd901
Uprev vendored libgit2 to v0.28
...
New version is here!
2019-02-11 03:57:50 +00:00
Carlos Martín Nieto
ee6dff2f8e
Use git_object_t instead of deprecated git_otype
2019-01-05 10:48:42 +00:00
Carlos Martín Nieto
fc1230ba16
Merge pull request #447 from walkenzoy/master
...
git2go: small fixes to odb module
2019-01-03 16:22:15 +01:00
lhchavez
344dc33fae
Return io.EOF on OdbReadStream.Read()
...
This change makes OdbReadStream.Read() comply with the usual io.Reader
semantics.
2018-12-28 04:35:20 +00:00
Michel Lespinasse
bdca40d275
git2go: small fixes to odb module
...
- 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()
2018-07-03 16:43:07 -07:00
Carlos Martín Nieto
cff71166ec
Adjust to the change in the git_odb_open_rstream signature
2018-02-22 09:28:58 +01:00
Carlos Martín Nieto
55a1096141
Third round of keep-alive aditions
2017-07-08 16:07:51 +02:00
Carlos Martín Nieto
f037074198
Merge remote-tracking branch 'origin/next'
2017-01-20 00:46:34 +00:00
Mark Karpeles
b829eb1edb
odb & refdb: make New*BackendFromC take unsafe.Pointer as argument allowing argument to be set from different package
2016-09-30 23:00:20 +09:00
Kirill Smelkov
cf7553e72c
odb: Expose git_odb_object_type() as OdbObject.Type()
...
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
2016-07-19 22:48:52 +03:00
Ian Lance Taylor
dc8b154f4f
odb: don't copy buffer
2016-02-16 21:40:05 -08:00
Ian Lance Taylor
b70973e5c7
Merge remote-tracking branch 'upstream/master'
2016-02-16 21:06:45 -08: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
Ian Lance Taylor
42b11d403d
handles, merge, odb: changes for Go 1.6 pointer passing rules
...
See http://tip.golang.org/cmd/cgo/#hdr-Passing_pointers .
2016-01-07 18:37:46 -08:00
Augie Fackler
714cd56c71
odb: remove debug fmt.Printlns
...
These appear to be left over debug statements, and they also look like
they were intended to be fmt.Printf calls anyway.
2015-11-02 16:00:19 -05: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
Mark Probst
45d88ca5f4
go fmt
2015-03-04 15:52:59 -08:00
Carlos Martín Nieto
a9d993f3d1
Remove useless includes
2014-12-11 02:59:07 +01:00
Carlos Martín Nieto
520a0425c7
Add the newer missing thread-locking instances
2014-12-06 03:03:26 +01:00
Carlos Martín Nieto
8c631b0c25
Add missing thread locking
2014-12-06 02:45:26 +01: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
Aidan Nulman
fc70808cb7
update for upstream changes
2014-04-03 16:49:22 -04:00
Aidan Nulman
d9f4adff6c
Merge branch 'master' into custom_odb
...
Conflicts:
odb.go
wrapper.c
2014-04-03 16:41:43 -04:00
Aidan Nulman
b5e60dc106
explicit returns
2014-04-03 16:39:21 -04:00
Carlos Martín Nieto
00ea11691b
Convert the rest of the errors
2014-02-26 16:14:31 +01:00
Jesper Hansen
499f52a354
Added git error code to the error object.
2014-02-26 16:10:00 +01:00
Aidan Nulman
2656a72e82
Merge branch 'master' into custom_odb
...
Conflicts:
git.go
reference.go
repository.go
submodule.go
2014-02-24 03:05:44 -05:00
Aidan Nulman
1c23e8ece3
add OdbBackend.Free() and the C it wraps; go fmt odb.go
2014-01-29 18:55:17 -05:00
Aidan Nulman
f610cf25d7
Merge branch 'master' into custom_odb
2014-01-28 22:49:55 -05:00
Claudiu-Vlad Ursache
bf209ca2ba
Remove unnecessary cast.
2014-01-26 12:36:05 +01:00
Claudiu-Vlad Ursache
4ce2eb713b
Add Odb hash function.
2014-01-25 22:18:32 +01:00
Aidan Nulman
e686586149
remove unnecessary comment
2013-12-20 14:26:00 -05:00
Aidan Nulman
59c7bd5ce4
Add OdbBackend constructor
2013-12-20 14:11:24 -05:00
Aidan Nulman
507a204249
Rename constructor functions to New...
2013-12-19 17:24:44 -05:00
Aidan Nulman
19b241bd55
Refactor InitRepositoryWCustomOdbBackend() into component functions
2013-12-19 00:33:23 -05:00
Aidan Nulman
dfe6d1ab7e
Stop assuming ODB backend includes wrapping routine; wrap in git2go instead
2013-12-18 17:25:54 -05:00
Carlos Martín Nieto
a40bdfd420
Lock the OS thread when acessing errors
...
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.
2013-12-18 16:18:32 +01:00
Carlos Martín Nieto
a5ad8de506
Don't repeat the pkg-config line
...
This is only needed once per package. Having it on every file makes the
build system ask about it n times, which is silly.
2013-11-14 00:23:04 +01:00
Vicent Martí
da5033fb98
Merge pull request #38 from libgit2/odb-stream
...
Wrap the odb streams
2013-09-17 08:03:34 -07:00
Carlos Martín Nieto
008e1efb35
Object types are constants
...
Define the object type values as constants
2013-09-11 23:01:27 +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
Vicent Martí
62f65d071d
Merge pull request #13 from libgit2/polymorphism-take-2
...
My take on polymorphism
2013-06-13 10:15:36 -07:00
Axel Wagner
3a0abcc2e4
Implement git_odb_foreach
2013-05-21 21:37:08 +02:00
Vicent Marti
d190d8a6b3
Take 2 on polymorphism
2013-04-16 23:04:35 +02:00
Vicent Marti
3ca8077334
Properly wrap ODB objects
2013-03-06 17:15:28 +01:00
Carlos Martín Nieto
d43561fbf7
Free Git objects via finalizers or manually
...
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.
2013-03-06 01:47:53 +01:00
Vicent Marti
b1d50b70ea
Initial commit
2013-03-05 20:53:04 +01:00