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
3cbfdf37f4
Add Filemode to TreeEntry
...
This field was missing, so let's add it, and let's add the const
definitions for the modes while we're here.
2013-09-09 14:21:16 +02:00
Carlos Martín Nieto
22f43840aa
Submodule: adjust to the Default -> Reset change in the library
2013-07-22 01:28:04 +02:00
Carlos Martín Nieto
f5fc7e5f78
Reference: adjust to iterator changes
...
The Library's iterators now can return either the reference or the
reference's name. As the name is what we're set up for, rename the
functions appropriately so we compile against altest development.
2013-06-17 02:08:13 +02:00
Carlos Martín Nieto
a33875f9c5
Packbuilder: compilation fixes
...
Don't name the return values, as they conflict with the names we want
inside and the types don't match what we want to have inside. We need
them to be two-way channels in the function, and then pass
unidirectional references to the different functions.
2013-06-17 01:55:36 +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
Vicent Martí
01d1a5c5d5
Merge pull request #24 from carlosmn/packbuilder-abort
...
Allow aborting the pack writing operation
2013-06-13 10:15:12 -07:00
Vicent Martí
09424744a1
Merge pull request #25 from carlosmn/error-nil
...
Catch nil error instances
2013-06-13 10:14:31 -07:00
Vicent Martí
7823b14266
Merge pull request #26 from carlosmn/ref-iter
...
Implement a reference iterator
2013-06-13 10:14:09 -07:00
Vicent Martí
81c9f8df5b
Merge pull request #31 from crosbymichael/master
...
Add nil for optional arguments to git_packbuilder_write
2013-06-13 10:12:05 -07:00
Vicent Martí
2c6cab8025
Merge pull request #29 from Merovius/parent
...
Implement Parent()-functions for Commits
2013-06-13 10:10:13 -07:00
Vicent Martí
551e580a79
Merge pull request #28 from Merovius/shorten
...
Implement ShortenOids
2013-06-13 10:09:53 -07:00
Vicent Martí
96d411bec4
Merge pull request #27 from Merovius/odb_foreach
...
Implement git_odb_foreach
2013-06-13 10:09:26 -07:00
Michael Crosby
6513377da0
Add nil for optional parameters for pack_write
...
The git_packbuilder_write function now takes
two optional arguments used for information
callbacks. These are currently not needed
in the Go wrapper.
2013-06-07 19:08:10 -04:00
Carlos Martín Nieto
b189d7919a
Allow aborting the pack writing operation
...
In case of an error in the writer, the packbuilder will stay around
waiting for someone to read from its channel. The state associated
with a packbuilder is non-trivial and it will keep a reference to the
object, so the GC won't be able to free it.
Change the ForEach interface to also return a "stop" channel. Closing
the channel or writing into it will cause the first receive clause to
act, making the callback to return -1, aborting the operation and
ending the goroutine, freeing its hold on the packbuilder.
2013-05-23 11:44:06 +02:00
Carlos Martín Nieto
931f187301
Implement a reference iterator
...
Wrap the reference iterators, and provide a Iter() function to get
them through a channel.
2013-05-23 11:13:42 +02:00
Axel Wagner
543a6a87af
Implement Parent()-functions for Commits
2013-05-21 23:18:02 +02:00
Axel Wagner
535a178afa
Implement ShortenOids
2013-05-21 23:03:11 +02:00
Axel Wagner
3a0abcc2e4
Implement git_odb_foreach
2013-05-21 21:37:08 +02:00
Carlos Martín Nieto
d824ea415d
Catch nil error instances
...
Unfortunately libgit2 sometimes returns an error without setting an
error message. Provide an alternative message instead of trying to
dereference nil.
2013-05-21 11:51:31 +02:00
Vicent Martí
4e0a28b064
Merge pull request #23 from Merovius/discover
...
Use cbool-helper in Discover()
2013-05-16 17:43:26 -07:00
Vicent Martí
b1c3de066f
Merge pull request #19 from Merovius/discover
...
Implement git_repository_discover
2013-05-16 17:41:34 -07:00
Axel Wagner
420cf7f0a6
Use cbool-helper in Discover()
2013-05-17 01:02:33 +02:00
Vicent Martí
5766c4accf
Merge pull request #18 from Merovius/objecttype
...
Use ObjectType in TreeEntry
2013-05-16 14:11:39 -07:00
Vicent Martí
a1743f75b2
Merge pull request #21 from Merovius/packbuilder
...
Implement Packbuilder-Support
2013-05-16 14:11:10 -07:00
Axel Wagner
3a1bbbdf9d
Correct some errors from 1da989e
2013-05-16 16:53:21 +02:00
Axel Wagner
1da989e28b
Add Write(w io.Writer) to packbuilder
...
This wraps (*packbuilder).ForEach(), making it possible to write the
pack easiliy to a tcp-connection, a HTTP-Body or the like.
2013-05-16 14:02:22 +02:00
Axel Wagner
140f362428
Add support for git_packbuilder
2013-05-16 13:56:07 +02:00
Axel Wagner
e1238b5994
Implement git_repository_discover
2013-05-14 21:35:58 +02:00
Vicent Martí
c9adbf05d7
Merge pull request #17 from Merovius/oid
...
Implement most of the oid_-functions as Methods
2013-04-26 14:54:14 -07:00
Axel Wagner
28b5284389
Use ObjectType in TreeEntry
2013-04-26 23:28:32 +02:00
Axel Wagner
f1848e48b8
Implement most of the oid_-functions as Methods
2013-04-26 21:12:27 +02:00
Vicent Martí
27e7ccee5a
Merge pull request #16 from Merovius/pointerrecv
...
Give gitObject.Free a pointer-receiver
2013-04-25 17:41:18 -07:00
Vicent Martí
eea1a15027
Merge pull request #15 from Merovius/objtype
...
Add String() Method to ObjectType
2013-04-25 17:40:39 -07:00
Vicent Martí
9822cc944e
Merge pull request #14 from Merovius/isbare
...
Wrap git_repository_is_bare
2013-04-25 17:39:57 -07:00
Axel Wagner
289d84e1f7
Give gitObject.Free a pointer-receiver
...
This is needed to get runtime.SetFinalizer to work, which
expects a pointer-receiver. Without it the runtime will crash, when it
tries to garbage-collect an object.
2013-04-26 02:32:41 +02:00
Axel Wagner
ac6ea9aa75
Add String() Method to ObjectType
2013-04-26 02:06:47 +02:00
Axel Wagner
a6429763a7
Wrap git_repository_is_bare
2013-04-26 00:10:28 +02:00
Vicent Marti
2bf17ba2f1
Ok, now with shared base object
2013-04-18 00:54:46 +02:00
Vicent Marti
7292cafac2
Add @carlosmn's tests
2013-04-16 23:18:35 +02:00
Vicent Marti
d190d8a6b3
Take 2 on polymorphism
2013-04-16 23:04:35 +02:00
Vicent Martí
c7286515b8
Merge pull request #12 from Merovius/checkout
...
Checkout
2013-04-12 13:41:32 -07:00
Axel Wagner
c1634c975e
Implement SetWorkdir
2013-03-19 23:07:10 +01:00
Axel Wagner
b27c14b620
Implement rudimentary checkout operations
2013-03-19 23:07:05 +01:00
Vicent Martí
3066c13c63
Merge pull request #10 from carlosmn/oid-id
...
TreeEntry: use Id instead of Oid
2013-03-08 14:08:43 -08:00
Carlos Martín Nieto
c854239784
TreeEntry: use Id instead of Oid
...
Name it like The Library and the rest of the bindings.
2013-03-08 21:26:19 +01:00
Vicent Martí
78d105f862
Merge pull request #9 from carlosmn/nil-oid
...
Oid: make sure not to dereference a NULL git_oid
2013-03-08 07:09:44 -08:00
Carlos Martín Nieto
62a16395b1
Oid: make sure not to dereference a NULL git_oid
...
Some calls like Reference.Target() can return NULL if the reference is
symbolic. Make sure newOidFromC() can handle these situations.
2013-03-08 16:03:49 +01:00
Vicent Martí
b57c792bf3
Merge pull request #8 from carlosmn/refs
...
Immutable refs
2013-03-07 12:03:14 -08:00
Carlos Martín Nieto
d5a5467738
Delete the whole test dir
2013-03-07 21:01:22 +01:00