summaryrefslogtreecommitdiff
path: root/reference.go
AgeCommit message (Collapse)Author
2021-09-05libgit2 v1.2.0 #majorlhchavez
This commit introduces libgit2 v1.2.0 to git2go, which brings a large number of [bugfixes and features](https://github.com/libgit2/libgit2/releases/tag/v1.2.0). This also marks the start of the v32 release.
2021-09-05Make all non-user-creatable structures non-comparable (#802)lhchavez
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.
2020-12-10Ensure that no pointer handles leak during the test (#712)lhchavez
This change makes sure that pointer handles are correctly cleaned up during tests.
2020-12-05Mark some symbols to be deprecated #minor (#698)lhchavez
This change introduces the file deprecated.go, which contains any constants, functions, and types that are slated to be deprecated in the next major release. These symbols are deprecated because they refer to old spellings in pre-1.0 libgit2. This also makes the build be done with the `-DDEPRECATE_HARD` flag to avoid regressions. This, together with [gorelease](https://godoc.org/golang.org/x/exp/cmd/gorelease)[1] should make releases safer going forward. 1: More information about how that works at https://go.googlesource.com/exp/+/refs/heads/master/apidiff/README.md
2020-11-13Add ReferenceNormalizeName (#681)Segev Finer
2019-01-05Use git_object_t instead of deprecated git_otypeCarlos Martín Nieto
2018-05-30git2go: fix reference iterator leakMichel Lespinasse
This fixes a leak that was apparently introduced in commit 55a109614151.
2018-02-15reference: minor doc improvementsJosh Bleecher Snyder
2017-07-08Third round of keep-alive aditionsCarlos Martín Nieto
2015-08-04Move from an Object interface to a typeCarlos Martín Nieto
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-07-24Add ReferenceIsValidName()Calin Seciu
2015-07-24Add check if reference is a noteCalin Seciu
2015-06-28Create a ReferenceCollection for managing referencesCarlos Martín Nieto
As with the other commits, this clears up the clutter in naming and around the Repository's API.
2015-03-15Update to libgit2 d675982a153Carlos Martín Nieto
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-04Default signatureMark Probst
2014-12-11Remove useless includesCarlos Martín Nieto
2014-12-06Add missing thread lockingCarlos Martín Nieto
2014-10-28Make the constants have typesCarlos Martín Nieto
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-05-26Keep a pointer to the repository in the objects and referencesCarlos Martín Nieto
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-25Give Object and Reference an Onwer accessorCarlos Martín Nieto
This reduces the need to carry around a pointer to the repository as well as the objects.
2014-05-23Reference: expose Peel()Carlos Martín Nieto
Peel a reference to a particular type of object, returning an Object, which you then perform a type assertion on.
2014-04-04Merge branch 'oid-parse-protection' into branch-iteratorJesse Ezell
2014-04-04fix typo / return name iteratorJesse Ezell
2014-04-02make it possible to handle errorsJesse Ezell
2014-03-20remove channel based iteration for branch / ref. Add ReferenceNameIterator. ↵Jesse Ezell
All iterators use Next(). Remove interfaces.
2014-03-19various improvements to interfaceJesse Ezell
2014-03-19split out name iteratorJesse Ezell
2014-03-19remove Branch struct, unify reference iteratorsJesse Ezell
2014-03-12add branch iterator / remove useless repo from reference iteratorJesse Ezell
2014-02-27Merge pull request #59 from libgit2/cmn/refsCarlos Martín Nieto
Add a few reference utility functions
2014-02-27Merge pull request #60 from libgit2/cmn/reflogs-defaultCarlos Martín Nieto
Allow for a default in reflog messages
2014-02-26Convert the rest of the errorsCarlos Martín Nieto
2014-02-26Added git error code to the error object.Jesper Hansen
2014-02-26Allow for a default in reflog messagesCarlos Martín Nieto
We don't have a way to represent a NULL string, so if the user passes an empty string, let's pass NULL down so we tell libgit2 to use the default.
2014-02-26Add a few reference utility functionsCarlos Martín Nieto
2014-02-23Merge pull request #55 from lye/add-is-x-reference-methodsCarlos Martín Nieto
Add Is$Type methods to Reference.
2014-02-23Merge commit 'refs/pull/53/head' of github.com:libgit2/git2goCarlos Martín Nieto
On top: fix git_buf handling and rename signature This fixes #57, #54. Conflicts: git.go reference.go repository.go submodule.go
2014-02-20Add Is$Type methods to Reference.lye
This patch adds the following methods to Reference: IsBranch() bool IsRemote() bool IsTag() bool which correspond to the `git_reference_is_$type` functions in libgit2.
2014-01-29update git2go to support latest libgit2 development commit (id: 66af84)Aidan Nulman
2013-12-18Lock the OS thread when acessing errorsCarlos Martín Nieto
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-11-14Don't repeat the pkg-config lineCarlos Martín Nieto
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-09-17Merge pull request #36 from libgit2/ref-iterVicent Martí
reference: get references out of the iterator
2013-09-12Give each const group a typeCarlos Martín Nieto
This allows us to restrict which constants the compiler will allow through, and makes the sorting in the documentation better.
2013-09-12Camel-case constantsCarlos Martín Nieto
Make the names look more like what you'd expect from Go.
2013-08-09reference: get references out of the iteratorCarlos Martín Nieto
Allow getting references out of the iterator instead of just names.
2013-06-17Reference: adjust to iterator changesCarlos Martín Nieto
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-05-23Implement a reference iteratorCarlos Martín Nieto
Wrap the reference iterators, and provide a Iter() function to get them through a channel.
2013-03-07Wrap immutable refsCarlos Martín Nieto