Commit Graph

52 Commits

Author SHA1 Message Date
Jose Alvarez 92d736d12c Fix Fetch/Push memory allocation problems
The Fetch/Push operations didn't allocate the git_*_options structure
and this causes a memory problem in the libgit2 code. Following the
example of Clone operation, the Fetch/Push functions allocates the
options structure before calling the C.
2015-11-12 21:15:24 -05:00
Aaron O'Mullan 803ef7dad5 Add nil check on CredentialsCallback wrapper 2015-08-31 12:48:11 +02:00
Aaron O'Mullan a572b15df6 Add back support for RemoteCallbacks in Remote.Push() 2015-08-31 12:43:36 +02:00
Carlos Martín Nieto b4ade2b9c6 Merge remote-tracking branch 'upstream/master' into next 2015-07-01 16:07:02 +02:00
Carlos Martín Nieto 2475907105 Merge commit 'refs/pull/174/head' of github.com:libgit2/git2go 2015-07-01 15:56:06 +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
Carlos Martín Nieto 4b9cbd78fd Create a RemoteCollection for managing remotes
Instead of making the 'Remote' part of the function calls, create a
collection object which serves to namespace the operations for the
remotes.
2015-06-28 00:51:17 +02:00
Carlos Martín Nieto ba0a24087a Get rid of Owner() on Remote and Submdoule
These are inherently unsafe. The underlying pointer might get released
at any moment.
2015-06-28 00:49:56 +02:00
Carlos Martín Nieto d400f1d5b2 Update to libgit2 fa39975 2015-06-28 00:34:54 +02:00
Carlos Martín Nieto c00a05586b Make the network code use handles
This wasn't ported together with the rest, but it does exhibit the same
issues, so let's port it over now.
2015-06-10 13:37:59 +02:00
Carlos Martín Nieto 36e0a256fe Update to libgit2 b6011e29 2015-06-08 04:11:21 +02: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
Matthew Donoughe 51e7cf0ad4 use git_signature_free 2015-02-13 20:44:29 -05:00
David Calavera dbddb88a8c Add prune methods to Remote. 2015-01-05 11:58:36 -08:00
Carlos Martín Nieto d57246fb74 Update to libgit2 master
This gets rid of the Push object. All network now goes through the
Remote object.
2015-01-04 17:05:11 +00:00
Carlos Martín Nieto 0202f152ac Add the new callbacks for Remote.Push()
This unifies the types with the Push struct, in preparation for its
deletion.
2014-12-13 01:23:40 +01:00
Carlos Martín Nieto 63116ea57e Update to master
This deprecates the Push struct in favour of Remote.Push()
2014-12-13 00:25:11 +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 27ce026f1c Merge pull request #140 from AaronO/patch-1
Add wrapper for git_remote_delete : Repository.DeleteRemote
2014-12-06 02:25:02 +01:00
Carlos Martín Nieto 1d759e3697 Update to master 2014-12-03 17:26:55 +01:00
Aaron O'Mullan 5b3bc2dd1f Add (*Repository).DeleteRemote 2014-11-26 22:05:21 +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
David Calavera d722c11f7f Hide C.git_direction type. 2014-10-27 09:08:05 -07:00
David Calavera e969b33b33 Make filtering logic more simple. 2014-10-27 08:32:50 -07:00
David Calavera d1b87efd96 Add connect methods to Remote. 2014-10-27 08:29:42 -07:00
David Calavera f6fa1a38ab Add Remote#Ls.
Allow filtering heads by name.
2014-10-24 17:28:10 -07:00
Carlos Martín Nieto 3b7cc1e97e remote: use the library's certificate validity if no callback is set
We should not return 0, as in this case that means we let it through,
return an appropriate error instead.
2014-10-19 14:38:00 +02:00
Carlos Martín Nieto 68bd3bbdd7 Fix header name
It turns out that some systems have a strings.h which includes string.h,
which does not happen on GNU systems.
2014-10-15 17:10:35 +02:00
Carlos Martín Nieto d9dfc4bce8 Add support for hostkey certificates
While they're not exactly certificates, they belong in the same
category.
2014-10-15 16:57:32 +02:00
Carlos Martín Nieto a81abd10ca Merge branch 'fetchhead'
Conflicts:
	remote.go
2014-10-15 15:59:08 +02:00
Jess Sheneberger d917a13aca add plumbing for update fetch head on remotes 2014-10-15 15:58:33 +02:00
Carlos Martín Nieto 17a9214307 Update to libgit2 master
The option to ignore the server's certificate has been removed, replaced
witha  callback for the user to perform their own checking.

Remote.Fetch() now performs opportunistic updates and takes a list of
refspecs to use as the active set for a particular fetch.
2014-10-15 15:56:59 +02:00
Carlos Martín Nieto dca2192492 Merge pull request #81 from jezell/remote-set-callbacks
add remote functions to set callbacks / set cert check
2014-04-26 20:22:44 +02:00
Carlos Martín Nieto b3a160b0f8 Adjust to libgit2 dev changes
This fixes #87
2014-04-26 18:43:22 +02:00
Jesse Ezell 7cf6b4f082 add set callbacks / set cert check 2014-04-04 09:51:46 -07:00
Carlos Martín Nieto 9cd1d129bc Remote: The whole point of the anonymous change
Was that it would break and we'd remember that the order changed. Oh
well.
2014-04-01 20:10:20 +02:00
Jesse Ezell 9d0d814f19 rename inmemory to anonymous remote 2014-04-01 11:06:47 -07:00
Jesse Ezell 5d8db7f936 return nil instead of empty array on error 2014-03-20 20:32:23 -07:00
Jesse Ezell 99d7f66477 add remote list 2014-03-20 20:32:15 -07:00
Carlos Martín Nieto 574f0dd12d Remote: remove Get prefix from refspecs
Idiomatic Go is to omit the Get from the getter methods.
2014-03-20 03:29:54 +01:00
Carlos Martín Nieto ad128bdefb Remote: don't mix allocators
We cannot ask libgit2 to free the memory we have allocated ourselves, as
it cannot know how to do it. Let's free the strarray ourselves.
2014-03-19 08:15:18 +01:00
Jesse Ezell 51aa76d6f7 remove strarray wrappers 2014-03-11 16:25:22 -07:00
Jesse Ezell d560b9e9bd cleanup clone code 2014-03-11 13:19:12 -07:00
Jesse Ezell 9fb7a746e0 fix handling of msg to treat empty str as nil 2014-02-28 10:58:53 -08:00
Jesse Ezell 374e2112df add push, refine remotes 2014-02-27 16:36:44 -08:00
Jesse Ezell e2db9b16cd merge latest, cleanup error handling, add thread locks 2014-02-26 10:41:20 -08:00
Jason Toffaletti 32bf5f0a23 wip wrapping git_remote 2014-01-06 20:05:35 +00:00
Jason Toffaletti d124544668 minor 2014-01-06 16:55:29 +00:00