summaryrefslogtreecommitdiff
path: root/src/git
diff options
context:
space:
mode:
Diffstat (limited to 'src/git')
-rw-r--r--src/git/commit.h12
-rw-r--r--src/git/common.h12
-rw-r--r--src/git/tag.h6
3 files changed, 19 insertions, 11 deletions
diff --git a/src/git/commit.h b/src/git/commit.h
index 308f30f35..5d3fa0adb 100644
--- a/src/git/commit.h
+++ b/src/git/commit.h
@@ -108,16 +108,20 @@ 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 committer the new committer
+ * @param name name of the new committer
+ * @param email email of the new committer
+ * @param time time when the committer committed the commit
*/
-GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const git_person *committer);
+GIT_EXTERN(void) git_commit_set_committer(git_commit *commit, const char *name, const char *email, time_t time);
/**
* Set the author of a commit
* @param commit the commit object
- * @param author the new author
+ * @param name name of the new author
+ * @param email email of the new author
+ * @param time time when the author created the commit
*/
-GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const git_person *author);
+GIT_EXTERN(void) git_commit_set_author(git_commit *commit, const char *name, const char *email, time_t time);
/**
* Set the tree which is pointed to by a commit
diff --git a/src/git/common.h b/src/git/common.h
index 6d4858d71..35408413d 100644
--- a/src/git/common.h
+++ b/src/git/common.h
@@ -2,6 +2,7 @@
#define INCLUDE_git_common_h__
#include "thread-utils.h"
+#include <time.h>
#ifdef __cplusplus
# define GIT_BEGIN_DECL extern "C" {
@@ -94,12 +95,13 @@ typedef struct git_repository git_repository;
/** Representation of a generic object in a repository */
typedef struct git_object git_object;
+
/** Parsed representation of a person */
-typedef struct git_person {
- char name[64]; /**< Full name */
- char email[64]; /**< Email address */
- time_t time; /**< Time when this person committed the change */
-} git_person;
+typedef struct git_person git_person;
+
+const char *git_person_name(git_person *person);
+const char *git_person_email(git_person *person);
+time_t git_person_time(git_person *person);
/** @} */
GIT_END_DECL
diff --git a/src/git/tag.h b/src/git/tag.h
index f9431db32..e1cd1ab85 100644
--- a/src/git/tag.h
+++ b/src/git/tag.h
@@ -100,9 +100,11 @@ GIT_EXTERN(void) git_tag_set_name(git_tag *tag, const char *name);
/**
* Set the tagger of a tag
* @param tag The tag to modify
- * @param tagger the new tagger for the tag
+ * @param name the name of the new tagger
+ * @param email the email of the new tagger
+ * @param time the time when the tag was created
*/
-GIT_EXTERN(void) git_tag_set_tagger(git_tag *tag, const git_person *tagger);
+GIT_EXTERN(void) git_tag_set_tagger(git_tag *tag, const char *name, const char *email, time_t time);
/**
* Set the message of a tag