Commit Graph

35 Commits

Author SHA1 Message Date
Carlos Martín Nieto 58334cf604 First round of mass keep-alive additions 2017-07-08 09:11:38 +02:00
Michael Daffin 74bc3c6242 Add check for ErrIterOver in BranchIterator.ForEach
The BranchIterator.ForEach currently returns the ErrIterOver error if no
error had occured during the iteration. This leads to a rather unhelpful
blank error message with the error code -31 when iterating over the
branches.

This commit adds a check for ErrIterOver at the end of the ForEach
method so that the client code only has to worry about checking for nil
as apose to checking for the ErrIterOver error.
2016-09-05 15:56:09 +01:00
Mirko Nosenzo 298f2e2111 BranchAll maps GIT_BRANCH_ALL
Added support to All Branch Iteration and Lookup
2016-05-29 15:01:07 +02:00
Carlos Martín Nieto f72db33baf Merge branch 'next' 2015-08-31 13:55:46 +02:00
Patrick Steinhardt cce14aa58b branch: fix memory leaks related to CStrings 2015-08-12 10:24:59 +02:00
Carlos Martín Nieto e50203a253 Merge remote-tracking branch 'upstream/master' into next
Conflicts:
	branch.go
2015-06-28 01:32:13 +02:00
shinningstar 830e171463 Free reference resource allocated by libgit2 during go garbage collecting 2015-06-08 22:36:31 +08:00
Carlos Martín Nieto c4fce1a218 Update to libgit2 d675982a153
There's been some changes to the checkout strategy, especially the
SAFE_CREATE mode, which is now the RECREATE_MISSING flag, though that
shouldn't be necessary to use in the general case.

The largest changes come from the removal of the signture from
ref-modifying functions/methods and the removal of the reflog string in
all but those directly related to moving references.
2015-03-15 01:49:32 +01:00
Mark Probst e439b931a6 Default signature 2015-03-04 15:52:57 -08:00
David Calavera 755721e684 Add BranchIterator#ForEach.
This abstracts the branch iteration from the user.
2015-02-19 11:44:56 +01:00
Carlos Martín Nieto a9d993f3d1 Remove useless includes 2014-12-11 02:59:07 +01:00
Carlos Martín Nieto 668aa5dae1 Make the constants have types
While Go will assign the correct type to a const block when it
auto-creates the values, assigning makes the const be typeless and will
only gain it in each particular use.

Make each constant in the blocks have an assigned type.
2014-10-28 11:29:31 +01:00
Carlos Martín Nieto 29a983b68f Switch default to static linking
Build in libgit2 statically into git2go by default, removing the need
for the right version to be available as a shared object.

We do still need to link dynamically against OpenSSL and LibSSH2.
2014-06-03 17:47:53 +02:00
Carlos Martín Nieto 8a73c75f1a Keep a pointer to the repository in the objects and references
Otherwise, the garbage collector might decide it's a good idea to throw
away the repository instance while the C object still has a pointer to
it. Hilarity ensues.
2014-05-26 09:28:07 +02:00
Jesse Ezell a7d3c5955a merge with improved error handling logic 2014-04-04 00:56:58 -07:00
Jesse Ezell 8319a792f3 Merge remote-tracking branch 'libgit/master' into branch-iterator 2014-04-04 00:26:22 -07:00
Carlos Martín Nieto a06f4a030a Adjust to Go tip changes
It does not like breaking aliasing rules, so let's keep a casted pointer
for when libgit2 wants that.
2014-04-01 12:36:44 +02:00
Jesse Ezell 5590078e6f remove channel based iteration for branch / ref. Add ReferenceNameIterator. All iterators use Next(). Remove interfaces. 2014-03-20 20:28:41 -07:00
Jesse Ezell 37b950bc90 various improvements to interface 2014-03-19 20:24:19 -07:00
Jesse Ezell 006286edb7 remove Branch struct, unify reference iterators 2014-03-19 00:19:02 -07:00
Jesse Ezell 5f01bd7abd add branch iterator / remove useless repo from reference iterator 2014-03-12 15:49:11 -07:00
Jesse Ezell 127643eb54 move return outside of switch for go 1.0 / travis 2014-02-28 11:08:15 -08:00
Jesse Ezell d6332f9526 fix msg handling to treat empty str as nil 2014-02-28 10:54:16 -08:00
Jesse Ezell b404c8b862 Remove unused consts 2014-02-28 10:47:56 -08:00
Jesse Ezell 2c56324ca5 fix bad git_buf handling 2014-02-28 10:46:57 -08:00
Jesse Ezell a5df611100 LastError -> MakeGitError 2014-02-26 08:50:47 -08:00
Jesse Ezell fe509411a5 Add thread locking 2014-02-26 08:45:38 -08:00
Jesse Ezell a728f70358 cleanup add-branch 2014-02-26 07:33:50 -08: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