diff options
Diffstat (limited to 'src/git/commit.h')
-rw-r--r-- | src/git/commit.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/git/commit.h b/src/git/commit.h index 4387925da..a584273a1 100644 --- a/src/git/commit.h +++ b/src/git/commit.h @@ -30,6 +30,18 @@ typedef struct git_commit git_commit; */ GIT_EXTERN(git_commit *) git_commit_lookup(git_repository *repo, const git_oid *id); +/* + * Create a new in-memory git_commit. + * + * The commit object must be manually filled using + * setter methods before it can be written to its + * repository. + * + * @param repo The repository where the object will reside + * @return the object if creation was posible; NULL otherwise + */ +GIT_EXTERN(git_commit *) git_commit_new(git_repository *repo); + /** * Get the id of a commit. * @param commit a previously loaded commit. |