Commit Graph

114 Commits

Author SHA1 Message Date
lhchavez 6fbd99e60f
Add support for custom smart transports (#806) (#809)
This change adds support for git smart transports. This will be then
used to implement http, https, and ssh transports that don't rely on the
libgit2 library.

(cherry picked from commit f1fa96c7b7)
2021-09-05 16:03:45 -07:00
lhchavez 2f3b2b5f25
Make all non-user-creatable structures non-comparable (#802) (#805)
This change makes all non-user-creatable structures non-comparable. This
makes it easier to add changes later that don't introduce breaking
changes from the go compatibility guarantees perspective.

This, of course, implies that this change _is_ a breaking change, but since
these structures are not intended to be created by users (or de-referenced),
it should be okay.

(cherry picked from commit dbe032c347)
2021-09-05 14:06:59 -07:00
github-actions[bot] d1b05aeb84
Add `CreateCommitWithSignature` (#782) (#791)
This change adds the wrapper for `git_commit_create_with_signature`.

(cherry picked from commit 15434610fe)

Co-authored-by: lhchavez <lhchavez@lhchavez.com>
2021-09-04 13:51:37 -07:00
lhchavez c7d968e12d
Add `Repository.CreateCommitBuffer` (#781) (#785)
This commit adds the Go binding for `git_commit_create_buffer`. This
will be used to support the 1.2.0 commit create callback.

(cherry picked from commit fbaf9d1d1a)
2021-09-04 13:29:52 -07:00
lhchavez bcfd445806
Git repository item path (#757) (#768)
add wrapper for `git_repository_item_path`

(cherry picked from commit a4d202ed7b)

Co-authored-by: Vladimir Buzuev <44682889+vladimir-buzuev@users.noreply.github.com>
2021-04-04 08:28:09 -07:00
github-actions[bot] 275690e61a
Implement git_repository_set_config (#735) (#743)
Closes #732

(cherry picked from commit 2fd0495c43)

Co-authored-by: Byoungchan Lee <daniel.l@hpcnt.com>
2021-03-07 17:55:17 -08:00
github-actions[bot] bbb77f1bdf
Support git_repository_message, git_repository_message_remove (#734) (#737)
Closes #646

(cherry picked from commit 07147a8ea8)

Co-authored-by: Byoungchan Lee <thisisbclee@gmail.com>
2021-02-03 06:29:14 -08:00
github-actions[bot] b9770ebde6
Ensure that no pointer handles leak during the test (#712) (#715)
This change makes sure that pointer handles are correctly cleaned up
during tests.

(cherry picked from commit e28cce87c7)

Co-authored-by: lhchavez <lhchavez@lhchavez.com>
2020-12-10 06:52:11 -08:00
github-actions[bot] f58d71b8a9
repository: Implement wrappers for `git_object_lookup_prefix` (#658) (#659)
While we already have wrappers for `git_object_lookup`, there are none
yet for the prefixed variant where only the first n bytes of the OID are
used for the lookup. This commit adds them.

(cherry picked from commit 37b81b61f1)

Co-authored-by: Patrick Steinhardt <ps@pks.im>
2020-10-22 06:05:23 -07:00
lhchavez 37230d2697 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.

(cherry picked from commit 2bb5930733)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto c1c2b5a730 Merge pull request #466 from lhchavez/repository-create_commit_from_ids
Add support for CreateCommitFromIds

(cherry picked from commit 8766f9f36c)
2020-08-16 07:19:09 -07: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