summaryrefslogtreecommitdiff
path: root/src/git2/commit.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-01-03 22:34:27 +0200
committerVicent Marti <tanoku@gmail.com>2011-01-03 22:34:27 +0200
commite52ed7a5595568f169b3df74b675059c3d04da4a (patch)
tree343dd106eeb770a4e3e68759c681a096469ba70a /src/git2/commit.h
parentfb3cd6bca40ef942898e9d5ae5d9f305deefcc40 (diff)
downloadlibgit2-e52ed7a5595568f169b3df74b675059c3d04da4a.tar.gz
Split object methods from repository.c
All the relevant git_object methods have been moved to object.c Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git2/commit.h')
-rw-r--r--src/git2/commit.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/git2/commit.h b/src/git2/commit.h
index ccffec45f..328f78ada 100644
--- a/src/git2/commit.h
+++ b/src/git2/commit.h
@@ -28,6 +28,7 @@
#include "common.h"
#include "types.h"
#include "oid.h"
+#include "repository.h"
/**
* @file git2/commit.h
@@ -49,7 +50,10 @@ GIT_BEGIN_DECL
* an annotated tag it will be peeled back to the commit.
* @return 0 on success; error code otherwise
*/
-GIT_EXTERN(int) git_commit_lookup(git_commit **commit, git_repository *repo, const git_oid *id);
+GIT_INLINE(int) git_commit_lookup(git_commit **commit, git_repository *repo, const git_oid *id)
+{
+ return git_repository_lookup((git_object **)commit, repo, id, GIT_OBJ_COMMIT);
+}
/**
* Create a new in-memory git_commit.
@@ -62,7 +66,10 @@ GIT_EXTERN(int) git_commit_lookup(git_commit **commit, git_repository *repo, con
* @param repo The repository where the object will reside
* @return 0 on success; error code otherwise
*/
-GIT_EXTERN(int) git_commit_new(git_commit ** commit, git_repository *repo);
+GIT_INLINE(int) git_commit_new(git_commit **commit, git_repository *repo)
+{
+ return git_repository_newobject((git_object **)commit, repo, GIT_OBJ_COMMIT);
+}
/**
* Get the id of a commit.