Commit Graph

454 Commits

Author SHA1 Message Date
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 66e1c47619 Merge pull request #41 from libgit2/cmn/threading
Lock the OS thread when acessing errors
2013-12-18 07:19:02 -08: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
Aidan Nulman 66dfbbf539 add function to init repos w/custom odb backends 2013-12-17 18:46:25 -05:00
Vicent Martí 625ffd022e Merge pull request #47 from kron4eg/tree_builder_mem_leak
Fix memleak, TreeBuilder, Config and Parent commit
2013-11-18 07:24:37 -08:00
Artiom Di 5e30c192e9 Fix memleak for Config and parent commit objects 2013-11-14 15:24:43 +02:00
Artiom Di 295ec8894c Fix memleak, free TreeBuilder 2013-11-14 13:08:34 +02:00
Carlos Martín Nieto d8c3772e35 ObjectType: capitalise Tag 2013-11-14 00:24:44 +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
Carlos Martín Nieto b5b891a03d Packbuilder: adjust to changes in dev 2013-11-13 06:53:10 +01:00
Johann Weging 961db94aa2 branch: Deleted BranchForeach 2013-10-30 15:01:08 +01:00
Johann Weging ed86064871 branch:BranchForeach: Correct handling of the ListFlags 2013-10-10 10:39:49 +02:00
Johann Weging 4c4da3a846 branch: Renamed BranchLookup to LookupBrnach 2013-10-08 14:52:22 +02:00
Johann Weging 6372ec052f branch: Renamed BranchCreate to CreateBranch 2013-10-08 14:49:03 +02:00
Johann Weging 771e0c11bc branch: Variable names don't repeat its type name any longer 2013-10-08 14:44:11 +02:00
Johann Weging f03cec5375 branch: Changed BranchT to BranchType 2013-10-08 14:39:05 +02:00
Johann Weging ff5150e6c9 branch: Implemented branch functions. 2013-10-08 02:07:06 +02:00
Carlos Martín Nieto f583ad8abd Remove leftover reference to old const 2013-09-22 00:05:37 +02:00
Vicent Martí 6c97b9ac9d Merge pull request #36 from libgit2/ref-iter
reference: get references out of the iterator
2013-09-17 08:03:50 -07:00
Vicent Martí da5033fb98 Merge pull request #38 from libgit2/odb-stream
Wrap the odb streams
2013-09-17 08:03:34 -07:00
Vicent Martí b5d4197108 Merge pull request #39 from libgit2/goify-consts
Goify consts
2013-09-17 08:03:06 -07:00
Carlos Martín Nieto b5aca803db Give each const group a type
This allows us to restrict which constants the compiler will allow
through, and makes the sorting in the documentation better.
2013-09-12 10:46:20 +02:00
Carlos Martín Nieto 00e3df94c7 Camel-case constants
Make the names look more like what you'd expect from Go.
2013-09-12 10:40:57 +02:00
Carlos Martín Nieto ef5fc37870 Tree: add EntryByPath
The more powerful version of EntryByName.
2013-09-12 10:16:49 +02: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
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 4abda3a60b reference: get references out of the iterator
Allow getting references out of the iterator instead of just names.
2013-08-09 18:22:26 +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 179b69ce21 Support for index-entries 2013-05-22 14:41: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