Git to Go; bindings for libgit2. Like McDonald's but tastier.
Go to file
David Calavera 29840d28ad Extract data into a go struct. 2014-08-22 22:36:18 -07:00
script Tighten up the build 2014-06-07 19:12:33 +02:00
vendor Update vendored libgit2 to v0.21.0 2014-07-03 08:36:04 +02:00
.gitmodules Remove left-over submodule configuration 2014-06-07 19:29:45 +02:00
.travis.yml travis: build with Go 1.3 2014-07-03 08:48:41 +02:00
LICENSE Initial commit 2013-03-05 20:53:04 +01:00
Makefile Move the settings into the main git2go 2014-06-07 18:57:46 +02:00
README.md Fix a typo in git2go path 2014-07-12 20:49:50 +02:00
blob.go Adjust to Go tip changes 2014-04-01 12:36:44 +02:00
branch.go Switch default to static linking 2014-06-03 17:47:53 +02:00
branch_test.go merge with improved error handling logic 2014-04-04 00:56:58 -07:00
checkout.go checkout: init_opts -> init_options 2014-05-03 18:56:44 +02:00
clone.go fix clone options init 2014-03-18 18:23:33 -07:00
clone_test.go Clean up after the tests 2014-03-19 08:15:19 +01:00
commit.go Keep a pointer to the repository in the objects and references 2014-05-26 09:28:07 +02:00
config.go Convert the rest of the errors 2014-02-26 16:14:31 +01:00
credentials.go cleanup clone code 2014-03-11 13:19:12 -07:00
diff.go use cast_ptr instead of ptr for travis go tip build 2014-04-04 09:42:17 -07:00
diff_test.go 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
git.go Really build statically 2014-06-07 15:43:05 +02:00
git_test.go test: adjust to safe commit append 2014-05-03 19:13:32 +02:00
index.go Index: add functions to handle the data structure 2014-05-25 18:12:50 +02:00
index_test.go Index: add functions to handle the data structure 2014-05-25 18:12:50 +02:00
merge.go Merge: merge analysis now returns the user's preference 2014-05-31 16:47:35 +02:00
merge_test.go Merge: merge analysis now returns the user's preference 2014-05-31 16:47:35 +02:00
object.go add support for annotated tags 2014-06-09 23:19:17 +02:00
object_test.go Give Object and Reference an Onwer accessor 2014-05-25 09:12:10 +02:00
odb.go Odb: use a callback instead of a channel for ForEach 2014-05-06 14:19:34 +02:00
odb_test.go Odb: use a callback instead of a channel for ForEach 2014-05-06 14:19:34 +02:00
packbuilder.go Packbuilder: use a callback for ForEach instead of a channel 2014-05-06 14:43:38 +02:00
patch.go 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
patch_test.go 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
push.go fix return for old go versions / travis 2014-03-11 13:45:27 -07:00
push_test.go make it possible to handle errors 2014-04-02 10:31:48 -07:00
refdb.go fix for travisci 2014-04-03 17:12:31 -04:00
reference.go Keep a pointer to the repository in the objects and references 2014-05-26 09:28:07 +02:00
reference_test.go Give Object and Reference an Onwer accessor 2014-05-25 09:12:10 +02:00
remote.go Merge pull request #81 from jezell/remote-set-callbacks 2014-04-26 20:22:44 +02:00
remote_test.go Remote: The whole point of the anonymous change 2014-04-01 20:10:20 +02:00
repository.go Extract data into a go struct. 2014-08-22 22:36:18 -07:00
revparse.go Extract data into a go struct. 2014-08-22 22:36:18 -07:00
revparse_test.go Extract data into a go struct. 2014-08-22 22:36:18 -07:00
settings.go Move the settings into the main git2go 2014-06-07 18:57:46 +02:00
settings_test.go Move the settings into the main git2go 2014-06-07 18:57:46 +02:00
submodule.go Added force argument for (*Submodule).Reload() and (*Repository).ReloadAllSubmodules() 2014-03-27 11:32:22 +01:00
tag.go add support for annotated tags 2014-06-09 23:19:17 +02:00
tag_test.go add support for annotated tags 2014-06-09 23:19:17 +02:00
tree.go Adjust to Go tip changes 2014-04-01 12:36:44 +02:00
walk.go make it possible to handle errors 2014-04-02 10:31:48 -07:00
wrapper.c Merge commit 'refs/pull/72/head' of github.com:libgit2/git2go 2014-04-26 20:51:21 +02:00

README.md

git2go

Go bindings for libgit2. The master branch follows the latest libgit2 release.

Installing

This project needs libgit2, which is written in C so we need to build that as well. In order to build libgit2, you need cmake, pkg-config and a C compiler. You will also need the development packages for OpenSSL and LibSSH2 if you want to use HTTPS and SSH respectively.

Run go get github.com/libgit2/git2go to download the code and go to your $GOPATH/src/github.com/libgit2/git2go dir. From there, we need to build the C code and put it into the resulting go binary.

git submodule update --init # get libgit2
make install

will compile libgit2 and run go install such that it's statically linked to the git2go package.

Running the tests

Similarly to installing, running the tests requires linking against the local libgit2 library, so the Makefile provides a wrapper

make test

alternatively, if you want to pass arguments to go test, you can use the script that sets it all up

./script/with-static.sh go test -v

which will run the specified arguments with the correct environment variables.

License

M to the I to the T. See the LICENSE file if you've never seen a MIT license before.

Authors

  • Carlos Martín (@carlosmn)
  • Vicent Martí (@vmg)