diff options
author | Vicent Martà <vicent@github.com> | 2013-08-28 09:38:14 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-08-28 09:38:14 -0700 |
commit | dbecec37a74a04a350e7c2ef6aee49d5d833d768 (patch) | |
tree | 5d911cac3bd602a3eab4c095ef8e96b84db332b3 /include/git2/commit.h | |
parent | 1ef05e3f0ea8fa8db2167307101c8c43d1c1784b (diff) | |
parent | b2d3efcbce2d12cfa9736ab4f9283c91600a8a75 (diff) | |
download | libgit2-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.h | 16 |
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 |