summaryrefslogtreecommitdiff
path: root/include/git2/commit.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-28 09:31:32 -0700
committerRussell Belfer <rb@github.com>2013-08-28 09:31:32 -0700
commitb2d3efcbce2d12cfa9736ab4f9283c91600a8a75 (patch)
treefa866a05ebaa26fe6c61500fc66596c5e304fa81 /include/git2/commit.h
parentf087bc245e9f3934d43c49f4034ee9b5638884dd (diff)
downloadlibgit2-b2d3efcbce2d12cfa9736ab4f9283c91600a8a75.tar.gz
Some documentation improvements
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