Commit Graph

86 Commits

Author SHA1 Message Date
Aidan Nulman 9299214e57 re-encapsulate repository 2014-02-26 23:44:32 -05:00
Jesper Hansen 499f52a354 Added git error code to the error object. 2014-02-26 16:10:00 +01:00
Carlos Martín Nieto 3e5586bd8d Remove 'oid' as id name
Following the cleanup from libgit2, let's not use 'oid' unless we mean
the name of the data type. In the other cases, we mean an identifier,
hence the name 'id'.
2014-02-26 15:30:16 +01:00
Carlos Martín Nieto 2c8de242ee Allow for a default in reflog messages
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-26 15:01:23 +01:00
Carlos Martín Nieto ca2c3c6db2 Add a few reference utility functions 2014-02-26 14:51:04 +01:00
Aidan Nulman 2656a72e82 Merge branch 'master' into custom_odb
Conflicts:
	git.go
	reference.go
	repository.go
	submodule.go
2014-02-24 03:05:44 -05:00
Aidan Nulman decaf064f9 add custom refdb backend support 2014-02-24 03:01:47 -05:00
Carlos Martín Nieto 1b09b03c0e Merge commit 'refs/pull/53/head' of github.com:libgit2/git2go
On top: fix git_buf handling and rename signature

This fixes #57, #54.

Conflicts:
	git.go
	reference.go
	repository.go
	submodule.go
2014-02-23 15:31:22 +01: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 d59f6d6d90 Merge branch 'catchupTo66af84' into custom_odb
Conflicts:
	git.go
	reference.go
	repository.go
	submodule.go
2014-01-29 18:10:38 -05:00
Aidan Nulman f66502aaf4 update git2go to support latest libgit2 development commit (id: 66af84) 2014-01-29 18:01:26 -05:00
Aidan Nulman f610cf25d7 Merge branch 'master' into custom_odb 2014-01-28 22:49:55 -05:00
Aidan Nulman 507a204249 Rename constructor functions to New... 2013-12-19 17:24:44 -05:00
Aidan Nulman 19b241bd55 Refactor InitRepositoryWCustomOdbBackend() into component functions 2013-12-19 00:33:23 -05:00
Aidan Nulman dfe6d1ab7e Stop assuming ODB backend includes wrapping routine; wrap in git2go instead 2013-12-18 17:25:54 -05:00
Carlos Martín Nieto a40bdfd420 Lock the OS thread when acessing errors
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-12-18 16:18:32 +01:00
Aidan Nulman 66dfbbf539 add function to init repos w/custom odb backends 2013-12-17 18:46:25 -05:00
Artiom Di 5e30c192e9 Fix memleak for Config and parent commit objects 2013-11-14 15:24:43 +02:00
Artiom Di 295ec8894c Fix memleak, free TreeBuilder 2013-11-14 13:08:34 +02:00
Carlos Martín Nieto a5ad8de506 Don't repeat the pkg-config line
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-11-14 00:23:04 +01:00
Carlos Martín Nieto 00e3df94c7 Camel-case constants
Make the names look more like what you'd expect from Go.
2013-09-12 10:40:57 +02:00
Vicent Martí 62f65d071d Merge pull request #13 from libgit2/polymorphism-take-2
My take on polymorphism
2013-06-13 10:15:36 -07:00
Axel Wagner a6429763a7 Wrap git_repository_is_bare 2013-04-26 00:10:28 +02:00
Vicent Marti 7292cafac2 Add @carlosmn's tests 2013-04-16 23:18:35 +02:00
Vicent Marti d190d8a6b3 Take 2 on polymorphism 2013-04-16 23:04:35 +02:00
Axel Wagner c1634c975e Implement SetWorkdir 2013-03-19 23:07:10 +01:00
Carlos Martín Nieto d5a5467738 Delete the whole test dir 2013-03-07 21:01:22 +01:00
Carlos Martín Nieto 0b2f16665d Wrap immutable refs 2013-03-07 21:01:21 +01:00
Carlos Martín Nieto 5c09440f42 Add a couple of missing methods around Blob 2013-03-06 23:59:33 +01:00
Vicent Marti e620ded393 Sane names yo 2013-03-06 17:18:25 +01:00
Vicent Marti 60eac43943 Repository.Path 2013-03-06 17:17:27 +01:00
Vicent Marti 20e2528478 Repository.CreateCommit 2013-03-06 16:59:45 +01:00
Carlos Martín Nieto 33f4594e9c Wrap git_index 2013-03-06 13:10:53 +01:00
Carlos Martín Nieto d43561fbf7 Free Git objects via finalizers or manually
Provide a manual way of freeing objects, but set finalizers for them
in case the user does not want to worry about memory management, which
would be useful for commits or trees, which sare typically small.

When the objects are freed manually, the finalizer is unset to avoid
double-freeing, mimicking what the go runtime does.
2013-03-06 01:47:53 +01:00
Carlos Martín Nieto 93ab5a1c3e Bring back the RevWalk 2013-03-05 21:47:55 +01:00
Vicent Marti b1d50b70ea Initial commit 2013-03-05 20:53:04 +01:00