summaryrefslogtreecommitdiff
path: root/include/git2/commit.h
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-08-28 09:38:14 -0700
committerVicent Martí <vicent@github.com>2013-08-28 09:38:14 -0700
commitdbecec37a74a04a350e7c2ef6aee49d5d833d768 (patch)
tree5d911cac3bd602a3eab4c095ef8e96b84db332b3 /include/git2/commit.h
parent1ef05e3f0ea8fa8db2167307101c8c43d1c1784b (diff)
parentb2d3efcbce2d12cfa9736ab4f9283c91600a8a75 (diff)
downloadlibgit2-dbecec37a74a04a350e7c2ef6aee49d5d833d768.tar.gz
Merge pull request #1805 from libgit2/threading-packed-load
Thread safety for the refdb_fs
Diffstat (limited to 'include/git2/commit.h')
-rw-r--r--include/git2/commit.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h
index fc0551be1..0eaf917bd 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -24,17 +24,24 @@ GIT_BEGIN_DECL
/**
* Lookup a commit object from a repository.
*
+ * The returned object should be released with `git_commit_free` when no
+ * longer needed.
+ *
* @param commit pointer to the looked up commit
* @param repo the repo to use when locating the commit.
* @param id identity of the commit to locate. If the object is
* an annotated tag it will be peeled back to the commit.
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_commit_lookup(git_commit **commit, git_repository *repo, const git_oid *id);
+GIT_EXTERN(int) git_commit_lookup(
+ git_commit **commit, git_repository *repo, const git_oid *id);
/**
- * Lookup a commit object from a repository,
- * given a prefix of its identifier (short id).
+ * Lookup a commit object from a repository, given a prefix of its
+ * identifier (short id).
+ *
+ * The returned object should be released with `git_commit_free` when no
+ * longer needed.
*
* @see git_object_lookup_prefix
*
@@ -45,7 +52,8 @@ GIT_EXTERN(int) git_commit_lookup(git_commit **commit, git_repository *repo, con
* @param len the length of the short identifier
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_commit_lookup_prefix(git_commit **commit, git_repository *repo, const git_oid *id, size_t len);
+GIT_EXTERN(int) git_commit_lookup_prefix(
+ git_commit **commit, git_repository *repo, const git_oid *id, size_t len);
/**
* Close an open commit