Commit Graph

47 Commits

Author SHA1 Message Date
lhchavez 05bc5e36ff Add support for indexers and alternate odb packfiles
This allows for implementations of git servers written in Go.
2020-02-23 09:13:47 -08:00
Carlos Martín Nieto c5159e624e credentials: unconfuse Go about the type
For some reason cgo thinks the `credtype` field does not exist in `git_cred` so
let's put it into the C code.
2019-12-10 22:33:00 +00:00
Carlos Martín Nieto f037074198 Merge remote-tracking branch 'origin/next' 2017-01-20 00:46:34 +00:00
Mirko Nosenzo 278dc9ac4f Checkout Callbacks
- 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-05-29 13:44:18 +02:00
Carlos Martín Nieto 9163ca7d50 Update to 1dc4491 2016-04-23 15:35:22 +02:00
Calin Seciu c6f394e407 Merge branch 'next' into stash-support 2016-02-20 14:52:57 +02:00
Ian Lance Taylor a1f25eafec handles, merge: simplify code, don't copy file contents 2016-02-16 21:34:43 -08:00
Calin Seciu d54ea1d6a8 Add stash support 2015-09-21 14:50:57 +03:00
Carlos Martín Nieto f72db33baf Merge branch 'next' 2015-08-31 13:55:46 +02:00
Patrick Steinhardt 0b530c15cf clone: improve handling of remote create callback
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-08-18 14:01:51 +02:00
Calin Seciu 6c4af98c5b Add more support for tags
Implement support for the following libgit2 functions:

- 'git_tag_list' and 'git_tag_list_match'
- 'git_tag_foreach'
- 'git_tag_create_lightweight'
2015-07-31 10:07:26 +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 e066d24efb Add DiffBlobs
This lets you diff two arbitrary blobs with arbitrary names.
2015-06-29 21:29:47 +02:00
Carlos Martín Nieto d400f1d5b2 Update to libgit2 fa39975 2015-06-28 00:34:54 +02: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
Carlos Martín Nieto 74957c2ae6 Add missing return type 2014-12-18 23:02:53 +00:00
Carlos Martín Nieto 0202f152ac Add the new callbacks for Remote.Push()
This unifies the types with the Push struct, in preparation for its
deletion.
2014-12-13 01:23:40 +01:00
Lucas Clemente 9d37f81764 implemented Index.AddAll, Index.RemoveAll, Index.UpdateAll 2014-10-24 21:55:08 +02:00
Carlos Martín Nieto 17a9214307 Update to libgit2 master
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-10-15 15:56:59 +02:00
Ben Navetta 33ae83f4d9 remove status_foreach binding 2014-08-25 18:15:36 -04:00
Ben Navetta 1cb654e4f2 add git_status_foreach binding 2014-08-19 08:51:18 -04:00
Carlos Martín Nieto 5809f03108 Merge commit 'refs/pull/72/head' of github.com:libgit2/git2go
Conflicts:
	git.go
	wrapper.c
2014-04-26 20:51:21 +02:00
Carlos Martín Nieto 4df7eb516c Merge pull request #63 from jezell/jezell/merge
Merge functions (in progress)
2014-04-26 20:42:18 +02:00
Carlos Martín Nieto 57f14a2591 Merge commit 'refs/pull/48/head' of github.com:libgit2/git2go 2014-04-26 20:30:57 +02:00
Carlos Martín Nieto b3a160b0f8 Adjust to libgit2 dev changes
This fixes #87
2014-04-26 18:43:22 +02:00
Aidan Nulman d9f4adff6c Merge branch 'master' into custom_odb
Conflicts:
	odb.go
	wrapper.c
2014-04-03 16:41:43 -04:00
Jesse Ezell 85420f2002 Merge branch 'master' of http://github.com/libgit2/git2go into merge 2014-03-26 11:18:21 -07:00
Jesse Ezell 155f641683 don't expose 3 different diff foreach methods. use structures instead of pointers to structures for diff detail. add patch error code handling. trim excess data from diff structures. 2014-03-21 22:51:38 -07:00
Jesse Ezell d78036fe24 refactor and cleanup code 2014-03-20 22:54:18 -07:00
Jesse Ezell 37964e878f merge with latest 2014-03-20 22:02:19 -07:00
Jesse Ezell 51aa76d6f7 remove strarray wrappers 2014-03-11 16:25:22 -07:00
Jesse Ezell d560b9e9bd cleanup clone code 2014-03-11 13:19:12 -07:00
Jesse Ezell 634acbe498 merge with latest 2014-03-11 12:55:57 -07:00
Jesse Ezell f1e889928a merge with latest, replace merge wrappers with go code 2014-03-11 12:29:40 -07:00
Jesse Ezell 5e163fa2e8 add blob chunk creation, creation of tree builders for specific trees, minor API cleanup 2014-03-07 16:43:20 -08:00
Jesse Ezell 9e7ba02708 wrap merge functions 2014-02-28 01:06:41 -08:00
Jesse Ezell 374e2112df add push, refine remotes 2014-02-27 16:36:44 -08:00
Aidan Nulman decaf064f9 add custom refdb backend support 2014-02-24 03:01:47 -05:00
lye bc80beb843 Add partial diff/patch functionality.
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-02-20 00:29:03 -06:00
Aidan Nulman 1c23e8ece3 add OdbBackend.Free() and the C it wraps; go fmt odb.go 2014-01-29 18:55:17 -05:00
Jason Toffaletti 32bf5f0a23 wip wrapping git_remote 2014-01-06 20:05:35 +00:00
Jason Toffaletti d124544668 minor 2014-01-06 16:55:29 +00:00
Jason Toffaletti e825d66fba work in progress wrapping git_clone 2014-01-04 00:40:21 +00:00
Axel Wagner 3a0abcc2e4 Implement git_odb_foreach 2013-05-21 21:37:08 +02:00
Axel Wagner 140f362428 Add support for git_packbuilder 2013-05-16 13:56:07 +02:00
Vicent Marti 439f7acf28 Submodule wrapping courtesy of @sbinet 2013-03-05 21:05:55 +01:00
Vicent Marti b1d50b70ea Initial commit 2013-03-05 20:53:04 +01:00