diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-12-18 02:35:45 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-12-18 02:35:45 +0200 |
| commit | b5ced41e85d4657376d3d6f53d8dc08ed3dcdacc (patch) | |
| tree | fdf9dace53aff8e531d162097fb76b5845df34d2 /src/git2/commit.h | |
| parent | 1f080e2da4833004fd178f622271879336085e22 (diff) | |
| parent | 638c2ca4281589b73f2d402bb80775242045144a (diff) | |
| download | libgit2-b5ced41e85d4657376d3d6f53d8dc08ed3dcdacc.tar.gz | |
Merge branch 'timezone'
Diffstat (limited to 'src/git2/commit.h')
| -rw-r--r-- | src/git2/commit.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/git2/commit.h b/src/git2/commit.h index 728679758..ccffec45f 100644 --- a/src/git2/commit.h +++ b/src/git2/commit.h @@ -93,18 +93,25 @@ GIT_EXTERN(const char *) git_commit_message(git_commit *commit); GIT_EXTERN(time_t) git_commit_time(git_commit *commit); /** + * Get the commit timezone offset (i.e. committer's preferred timezone) of a commit. + * @param commit a previously loaded commit. + * @return positive or negative timezone offset, in minutes from UTC + */ +GIT_EXTERN(int) git_commit_timezone_offset(git_commit *commit); + +/** * Get the committer of a commit. * @param commit a previously loaded commit. * @return the committer of a commit */ -GIT_EXTERN(const git_person *) git_commit_committer(git_commit *commit); +GIT_EXTERN(const git_signature *) git_commit_committer(git_commit *commit); /** * Get the author of a commit. * @param commit a previously loaded commit. * @return the author of a commit */ -GIT_EXTERN(const git_person *) git_commit_author(git_commit *commit); +GIT_EXTERN(const git_signature *) git_commit_author(git_commit *commit); /** * Get the tree pointed to by a commit. @@ -147,20 +154,16 @@ GIT_EXTERN(void) git_commit_set_message(git_commit *commit, const char *message) /** * Set the committer of a commit * @param commit the commit object - * @param name name of the new committer - * @param email email of the new committer - * @param time time when the committer committed the commit + * @param author_sig signature of the committer */ -GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const char *name, const char *email, time_t time); +GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const git_signature *committer_sig); /** * Set the author of a commit * @param commit the commit object - * @param name name of the new author - * @param email email of the new author - * @param time time when the author created the commit + * @param author_sig signature of the author */ -GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const char *name, const char *email, time_t time); +GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const git_signature *author_sig); /** * Set the tree which is pointed to by a commit |
