summaryrefslogtreecommitdiff
path: root/wrapper.c
AgeCommit message (Collapse)Author
2024-12-16update to libgit2 version 1.8.4. dump old github and vendor stuffJeff Carr
go install go.wit.com/apps/go-clone@latest go install go.wit.com/apps/go-mod-clean@latest go-clone --recusive go.wit.com/lib/git2go Signed-off-by: Jeff Carr <[email protected]>
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-05Add support for custom smart transports (#806)lhchavez
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.
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-06Add `NewCredentialSSHKeyFromSigner` (#706)lhchavez
This change adds `NewCredentialSSHKeyFromSigner`, which allows idiomatic use of SSH keys from Go. This also lets us spin off an SSH server in the tests.
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-08-18Add support for creating signed commits and signing commits during a rebase ↵michael boulton
(#626)
2020-08-18More diff functionality (#629)michael boulton
This PR adds - The ability to apply a Diff object to the repo - Support for git_apply_hunk_cb and git_apply_delta_cb callbacks in options for applying the diffs - The ability to import a diff from a raw buffer (for example, one exported by ToBuf) into a Diff object associated with the repo - Tests for the above
2020-02-23Add support for indexers and alternate odb packfileslhchavez
This allows for implementations of git servers written in Go.
2019-12-10credentials: unconfuse Go about the typeCarlos Martín Nieto
For some reason cgo thinks the `credtype` field does not exist in `git_cred` so let's put it into the C code.
2017-01-20Merge remote-tracking branch 'origin/next'Carlos Martín Nieto
2016-05-29Checkout CallbacksMirko Nosenzo
- Added CheckoutNotifyType mapping git_checkout_notify_t - Added CheckoutOpts.NotifyFlags of type CheckoutNotifyType - Added CheckoutNotifyCallback mapping git_checkout_notify_cb - Added CheckoutProgressCallback mapping git_checkout_progress_cb
2016-04-23Update to 1dc4491Carlos Martín Nieto
2016-02-20Merge branch 'next' into stash-supportCalin Seciu
2016-02-16handles, merge: simplify code, don't copy file contentsIan Lance Taylor
2015-09-21Add stash supportCalin Seciu
2015-08-31Merge branch 'next'Carlos Martín Nieto
2015-08-18clone: improve handling of remote create callbackPatrick Steinhardt
The clone options contain fields for ae remote create callback and its payload, which can be used to override the behavior when the default remote is being created for newly cloned repositories. Currently we only accept a C function as callback, though, making it overly complicated to use it. We also unconditionally `free` the payload if its address is non-`nil`, which may cause the program to segfault when the memory is not dynamically allocated. Instead, we want callers to provide a Go function that is subsequently being called by us. To do this, we introduce an indirection such that we are able to extract the provided function and payload when being called by `git_clone` and handle the return values of the user-provided function.
2015-07-31Add more support for tagsCalin Seciu
Implement support for the following libgit2 functions: - 'git_tag_list' and 'git_tag_list_match' - 'git_tag_foreach' - 'git_tag_create_lightweight'
2015-07-01Merge remote-tracking branch 'upstream/master' into nextCarlos Martín Nieto
2015-06-29Add DiffBlobsCarlos Martín Nieto
This lets you diff two arbitrary blobs with arbitrary names.
2015-06-28Update to libgit2 fa39975Carlos Martín Nieto
2015-01-04Update to libgit2 masterCarlos Martín Nieto
This gets rid of the Push object. All network now goes through the Remote object.
2014-12-18Add missing return typeCarlos Martín Nieto
2014-12-13Add the new callbacks for Remote.Push()Carlos Martín Nieto
This unifies the types with the Push struct, in preparation for its deletion.
2014-10-24implemented Index.AddAll, Index.RemoveAll, Index.UpdateAllLucas Clemente
2014-10-15Update to libgit2 masterCarlos Martín Nieto
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-08-25remove status_foreach bindingBen Navetta
2014-08-19add git_status_foreach bindingBen Navetta
2014-04-26Merge commit 'refs/pull/72/head' of github.com:libgit2/git2goCarlos Martín Nieto
Conflicts: git.go wrapper.c
2014-04-26Merge pull request #63 from jezell/jezell/mergeCarlos Martín Nieto
Merge functions (in progress)
2014-04-26Merge commit 'refs/pull/48/head' of github.com:libgit2/git2goCarlos Martín Nieto
2014-04-26Adjust to libgit2 dev changesCarlos Martín Nieto
This fixes #87
2014-04-03Merge branch 'master' into custom_odbAidan Nulman
Conflicts: odb.go wrapper.c
2014-03-26Merge branch 'master' of http://github.com/libgit2/git2go into mergeJesse Ezell
2014-03-21don't expose 3 different diff foreach methods. use structures instead of ↵Jesse Ezell
pointers to structures for diff detail. add patch error code handling. trim excess data from diff structures.
2014-03-20refactor and cleanup codeJesse Ezell
2014-03-20merge with latestJesse Ezell
2014-03-11remove strarray wrappersJesse Ezell
2014-03-11cleanup clone codeJesse Ezell
2014-03-11merge with latestJesse Ezell
2014-03-11merge with latest, replace merge wrappers with go codeJesse Ezell
2014-03-07add blob chunk creation, creation of tree builders for specific trees, minor ↵Jesse Ezell
API cleanup
2014-02-28wrap merge functionsJesse Ezell
2014-02-27add push, refine remotesJesse Ezell
2014-02-24add custom refdb backend supportAidan Nulman
2014-02-20Add partial diff/patch functionality.lye
This commit adds barebones capacity to generate diffs from two trees and to emit those as git-style diffs (via `Patch.String`), or to enumerate the files/hunks/lines in the diff to emit the data yourself. The walk functions have been implemented in the same manner as the Odb walking methods. Note that not all of the functionality is implemented for either the `git_diff_*` nor the `git_patch_*` functions, and there are unexposed constants which would likely be useful to add.
2014-01-29add OdbBackend.Free() and the C it wraps; go fmt odb.goAidan Nulman
2014-01-06wip wrapping git_remoteJason Toffaletti