summaryrefslogtreecommitdiff
path: root/merge.go
AgeCommit message (Collapse)Author
2021-09-05Make all Options objects consistentlhchavez
This change makes all Options objects have child Option fields as values (instead of pointers) to mirror the libgit2 interface. It also names them Options instead of Opts to match the current libgit2 nomenclature and removes the Version fields.
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-13Support more MergeBase functions (#720)lhchavez
This change adds support for MergeBaseMany, MergeBasesMany, and MergeBaseOctopus.
2020-12-10More callback refactoring (#713)lhchavez
This change: * Gets rid of the `.toC()` functions for Options objects, since they were redundant with the `populateXxxOptions()`. * Adds support for `errorTarget` to the `RemoteOptions`, since they are used in the same stack for some functions (like `Fetch()`). Now for those cases, the error returned by the callback will be preserved as-is.
2020-12-05Refactor all callbacks (#700)lhchavez
This change is a preparation for another change that makes all callback types return a Go error instead of an error code / an integer. That is going to make make things a lot more idiomatic. The reason this change is split is threefold: a) This change is mostly mechanical and should contain no semantic changes. b) This change is backwards-compatible (in the Go API compatibility sense of the word), and thus can be backported to all other releases. c) It makes the other change a bit smaller and more focused on just one thing. Concretely, this change makes all callbacks populate a Go error when they fail. If the callback is invoked from the same stack as the function to which it was passed (e.g. for `Tree.Walk`), it will preserve the error object directly into a struct that also holds the callback function. Otherwise if the callback is pased to one func and will be invoked when run from another one (e.g. for `Repository.InitRebase`), the error string is saved into the libgit2 thread-local storage and then re-created as a `GitError`.
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-10-22refactor: Use undeprecated options init (#656)Suhaib Mujahid
This PR move form linking against the deprecated `init_options` functions to the renamed `options_init` functions. For more context see libgit2/libgit2@0b5ba0d744e69da5dc8c08d167c83dd87ed83af2 and libgit2/libgit2@c6184f0c4b209e462bf3f42ab20df2d13d8ee918.
2020-09-18merge: Expose recursion limit merge option (#642)Patrick Steinhardt
The `recursion_limit` merge option provided by libgit2 is currently not exposed and thus inaccessible to Git2Go users. Let's expose it to let users control creation of recursive merge bases.
2020-06-04Provide missing merge flags (#615)Takuji Shimokawa
This change adds two missing merge flags MergeTreeSkipREUC and MergeTreeNoRecursive.
2020-02-23Add test and runtime.KeepAlive()lhchavez
2020-02-23Merge remote-tracking branch 'upstream/master' into more-annotated-commitlhchavez
2019-12-10Adjust to libgit2 changesCarlos Martín Nieto
2019-01-02Merge pull request #425 from josharian/more-merge-file-flagsCarlos Martín Nieto
merge: add missing MergeFileFlag constants
2018-02-22merge: expose the conflict marker size optionCarlos Martín Nieto
2018-01-25merge: add missing MergeFileFlag constantsJosh Bleecher Snyder
While we're here, pull in comments as well. While one can pop back and forth between godoc and libgit2 refs, it's much nicer to have it in one place. Note that MergeFileStyleSimplifyAlnum probably should have been called merely MergeFileSimplifyAlnum (no "Style"). It's probably not worth breaking backwards compatibility to fix it, but we avoid the mistake going forwards.
2018-01-25merge: add two missing AnnotatedCommit methodsJosh Bleecher Snyder
2017-07-08Third round of keep-alive aditionsCarlos Martín Nieto
2016-02-18Merge branch 'master' into nextCarlos Martín Nieto
2016-02-17Upgrade to libgit2 to 0f9d15493d5d8ad4353dd7beed52c9567334f6e5Han-Wen Nienhuys
2016-02-16merge: remove whitespace changeIan Lance Taylor
2016-02-16handles, merge: simplify code, don't copy file contentsIan Lance Taylor
2016-02-15Merge remote-tracking branch 'upstream/master' into nextCarlos Martín Nieto
2016-01-07handles, merge, odb: changes for Go 1.6 pointer passing rulesIan Lance Taylor
See http://tip.golang.org/cmd/cgo/#hdr-Passing_pointers .
2015-10-26Mention that MergeAnalysis is a bitmaskCarlos Martín Nieto
2015-10-26Update libgit2 to 821131fCalin Seciu
The API changes are: - `*Remote.Connect` ```go // from: func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks) error // to: func (o *Remote) Connect(direction ConnectDirection, callbacks *RemoteCallbacks, headers []string) error ``` - `*Remote.ConnectFetch` - `headers` was added as above - `*Remote.ConnectPush` - `headers` was added as above
2015-09-18Merge remote-tracking branch 'origin/master' into nextCarlos Martín Nieto
2015-08-31Run go fmtCarlos Martín Nieto
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-31Merge branch 'next'Carlos Martín Nieto
2015-08-12merge: fix memory leak related to merge file optsPatrick Steinhardt
2015-08-04Merge remote-tracking branch 'origin/master' into nextCarlos Martín Nieto
2015-07-31Wrap MergeBasesCarlos Martín Nieto
While here, test MergeBase as well.
2015-04-18Update to libgit2 4c02d3937Carlos Martín Nieto
2015-01-29Add TargetDirectory field to Checkout options.joseferminj
TargetDirectory field indicates a alternative checkout path to workdir.
2014-12-11Remove useless includesCarlos Martín Nieto
2014-12-06Add missing thread lockingCarlos Martín Nieto
2014-12-03Update to masterCarlos Martín Nieto
2014-11-08Fix MergeTrees func to accept nil as ancestor parameterjoseferminj
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-31Merge: merge analysis now returns the user's preferenceCarlos Martín Nieto
2014-04-04use cast_ptr instead of ptr for travis go tip buildJesse Ezell
2014-04-04merge latest, copy merge bytes to go arrayJesse Ezell
2014-03-26Merge analysis and merge fileJesse Ezell
2014-03-26support nil merge optionsJesse Ezell
2014-03-26update to new merge APIJesse Ezell
2014-03-11remove useless wrappersJesse Ezell
2014-02-28Add defaults, add simple test, merge heads should be pointer arrayJesse Ezell
2014-02-28move finalizer above freeJesse Ezell
2014-02-28switch from iota to explicit defJesse Ezell
2014-02-28merge options / merge tree optionsJesse Ezell
2014-02-28wrap merge functionsJesse Ezell