Commit Graph

60 Commits

Author SHA1 Message Date
Frank Benkstein bbdc7a825d add support for annotated tags 2014-06-09 23:19:17 +02:00
Carlos Martín Nieto 8a73c75f1a Keep a pointer to the repository in the objects and references
Otherwise, the garbage collector might decide it's a good idea to throw
away the repository instance while the C object still has a pointer to
it. Hilarity ensues.
2014-05-26 09:28:07 +02:00
Carlos Martín Nieto ec97cb4473 Merge branch 'repo-ext' 2014-05-23 16:02:36 +02:00
cloudson 591a67fef8 Add function to open repository from subpaths 2014-05-23 16:02:30 +02:00
Ondrej Kupka 2cf19370bc Implement git_repository_set_head(_detached)
This closes #88

Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>
2014-05-03 13:55:25 +02: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
cloudson 80ad996dc1 Recursive find respository 2014-04-17 08:33:22 -03:00
Jesse Ezell b00cb1a343 Merge remote-tracking branch 'libgit/master' into add-basic-diff-patch 2014-04-04 00:30:05 -07:00
Jesse Ezell 864c57f554 merge latest, copy merge bytes to go array 2014-04-04 00:22:42 -07:00
Aidan Nulman fc70808cb7 update for upstream changes 2014-04-03 16:49:22 -04:00
Aidan Nulman d9f4adff6c Merge branch 'master' into custom_odb
Conflicts:
	odb.go
	wrapper.c
2014-04-03 16:41:43 -04:00
Aidan Nulman b5e60dc106 explicit returns 2014-04-03 16:39:21 -04:00
Carlos Martín Nieto a06f4a030a Adjust to Go tip changes
It does not like breaking aliasing rules, so let's keep a casted pointer
for when libgit2 wants that.
2014-04-01 12:36:44 +02: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 d0b334b244 cleanup and refactor diff / patch 2014-03-20 21:56:41 -07:00
Jesse Ezell 7cbbeff7ac merge with latest 2014-03-11 12:42:08 -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
Carlos Martín Nieto 639b66345c Fix an old error function call that snuck in 2014-02-28 14:11:21 +01:00
Jesse Ezell 0497d2b114 fix bad merge (LastError -> MakeGitError) 2014-02-28 00:21:48 -08:00
Carlos Martín Nieto fc6d0fbfff Merge pull request #59 from libgit2/cmn/refs
Add a few reference utility functions
2014-02-27 17:03:39 +01:00
Carlos Martín Nieto c431fe3c2c Merge pull request #60 from libgit2/cmn/reflogs-default
Allow for a default in reflog messages
2014-02-27 17:03:20 +01:00
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