lhchavez
2bb5930733
Free() the copies of repository.LookupXxx()
...
`repository.LookupXxx()` allocate new go `Object`s that have a reference
to a `C.git_object`. Those are then duplicated with `git_object_dup()`,
so the original `Object`s linger unnecessarily until the Go GC kicks in.
This change explicitly calls `Free()` on the originals to avoid
unnecessary accumulation of garbage.
2020-02-22 19:21:44 -08:00
lhchavez
6d67bde74a
Merge remote-tracking branch 'upstream/master' into repository-create_commit_from_ids
2019-01-08 02:51:21 +00:00
lhchavez
35518c78df
Keeping the tree alive
2019-01-08 02:50:42 +00:00
lhchavez
f505e39c9e
Add a test and some comments as to the ugly pointer arithmetic
2019-01-08 02:50:25 +00:00
Carlos Martín Nieto
ee6dff2f8e
Use git_object_t instead of deprecated git_otype
2019-01-05 10:48:42 +00:00
lhchavez
8ff5e43711
Add support for CreateCommitFromIds
...
This change adds support for CreateCommitFromIds from libgit2.
2018-11-15 03:19:28 +00:00
reujab
a119b21dbb
fixed typos
2017-07-11 23:52:13 -04:00
Carlos Martín Nieto
55a1096141
Third round of keep-alive aditions
2017-07-08 16:07:51 +02:00
Carlos Martín Nieto
7d29d68644
Second round of keep-alives
2017-07-08 11:38:19 +02:00
Carlos Martín Nieto
58334cf604
First round of mass keep-alive additions
2017-07-08 09:11:38 +02:00
M. Adam Kendall
7738ebe30a
Add new repository open flags
2017-03-07 23:23:24 -05:00
Carlos Martín Nieto
aadd0c2035
Merge remote-tracking branch 'upstream/master' into next
2016-08-27 21:07:44 +02:00
Mirko Nosenzo
8b855ce765
Tag Remove
...
Added support for removal of a Tag
2016-05-29 14:57:00 +02:00
Hans Rødtang
2be7d7987b
Add Repository.IsShallow
2016-03-29 20:42:41 +02:00
Hans Rødtang
726331dfde
Add Repository.IsEmpty
2016-03-29 20:42:30 +02:00
Hans Rødtang
b99dbb1361
Add Repository.IsHeadUnborn
2016-03-29 20:42:19 +02:00
Calin Seciu
c6f394e407
Merge branch 'next' into stash-support
2016-02-20 14:52:57 +02:00
Carlos Martín Nieto
6d6736b2bd
Merge remote-tracking branch 'upstream/master' into next
2016-02-15 15:02:19 +01:00
Michael Gehring
1bc7cf60bd
Add missing RepositoryOpenExtended arguments
...
Fixes #277
2016-01-15 22:31:21 +01:00
Jose Alvarez
22495763b7
Expose AddGitIgnoreRules and ClearGitIgnoreRules funcs
2015-10-13 11:33:37 -04:00
Calin Seciu
d54ea1d6a8
Add stash support
2015-09-21 14:50:57 +03:00
Carlos Martín Nieto
d5890f58e8
Run go fmt
...
As it seems to be something that many people can't get over, reformat
all the files; as we're breaking things, whoever depended on 'next' will
have to take many changes into account anyway, so let's include this to
reduce the noise of incoming patches.
2015-08-31 20:22:17 +02:00
Carlos Martín Nieto
b7159b0cd4
Move from an Object interface to a type
...
An Object should be about representing a libgit2 object rather than
showing which methods it should support.
Change any return of Object to *Object and provide methods to convert
between this and the particular type.
2015-08-04 14:47:10 +02:00
Carlos Martín Nieto
def4494b74
Move CreateTag to the tags collection
2015-07-31 20:23:05 +02:00
Calin Seciu
12311c8528
Add TagsCollection
2015-07-31 09:51:19 +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
4eae20ec27
Adjust style
2015-07-01 16:00:17 +02:00
Carlos Martín Nieto
84275e691f
Merge commit 'refs/pull/198/head' of github.com:libgit2/git2go
2015-07-01 15:58:21 +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
66d266f971
Repository: move to use an actual constructor
...
This should further reduce the changes of the creation of the object
going badly.
2015-06-30 19:03:52 +02:00
Carlos Martín Nieto
70c95a7655
Create a NotesCollection for managing notes
...
As with the others, move these methods into their own namespace.
2015-06-28 01:19:22 +02:00
Carlos Martín Nieto
01a2d8d38d
Create a ReferenceCollection for managing references
...
As with the other commits, this clears up the clutter in naming and
around the Repository's API.
2015-06-28 01:12:32 +02:00
Carlos Martín Nieto
d2808d1610
Create a SubmoduleCollection for managing submodules
...
Similarly to RemoteCollection, this allows us to namespace the submodule
operations much more concisely and removes API on the Repository.
2015-06-28 00:58:31 +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
Fernando Oliveira
c1df2dcdc1
Add method to check if repo is detached
2015-04-30 23:16:12 -03:00
Carlos Martín Nieto
b374e16db8
Update to libgit2 4c02d3937
2015-04-18 04:50:39 +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
Mark Probst
db5fa66b48
State cleanup
2015-03-04 15:52:55 -08:00
Mark Probst
56ed0b22d7
Repository state
2015-03-04 15:52:52 -08:00
Matthew Donoughe
51e7cf0ad4
use git_signature_free
2015-02-13 20:44:29 -05:00
Ben Burkert
4989fc5a15
Add git note support
2015-01-07 11:56:33 -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
David Calavera
d69c771453
Update libgit2
...
Fix calls to C.git_treebuilder_create and C.git_treebuilder_write.
2014-12-18 22:59:08 +00:00
Carlos Martín Nieto
8c631b0c25
Add missing thread locking
2014-12-06 02:45:26 +01:00
Alexander Surma
d196da40ed
Repository.CreateCommit: Only allocate CStr on non-empty refname
2014-09-04 09:57:54 +02:00
Alexander Surma
fe452620c6
Repository.CreateCommit: Allow empty refname for non-update commit
2014-09-01 19:27:44 +02:00
David Calavera
29840d28ad
Extract data into a go struct.
2014-08-22 22:36:18 -07:00
Frank Benkstein
b3306bee41
fix indentation
2014-06-11 19:55:24 +02:00
Frank Benkstein
bbdc7a825d
add support for annotated tags
2014-06-09 23:19:17 +02:00