From 364788e1d114a174dd3c6fdfd3aa16d9627551b2 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Sat, 7 Aug 2010 00:59:58 +0200 Subject: Refactor parsing methods The 'parse_oid' and 'parse_person' methods which were used by the commit parser are now global so they can be used when parsing other objects. The 'git_commit_person' struct has been changed to a generic 'git_person'. Signed-off-by: Vicent Marti --- src/git/commit.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/git/commit.h') diff --git a/src/git/commit.h b/src/git/commit.h index 6d34f01ce..89f0929c9 100644 --- a/src/git/commit.h +++ b/src/git/commit.h @@ -17,13 +17,6 @@ GIT_BEGIN_DECL /** Parsed representation of a commit object. */ typedef struct git_commit git_commit; -/** Parsed representation of an author/committer of a commit */ -typedef struct git_commit_person { - char name[64]; /**< Full name */ - char email[64]; /**< Email address */ - time_t time; /**< Time when this person commited the change */ -} git_commit_person; - /** * Locate a reference to a commit without loading it. * The generated commit object is owned by the revision @@ -84,14 +77,14 @@ GIT_EXTERN(time_t) git_commit_time(git_commit *commit); * @param commit a previously loaded commit. * @return the committer of a commit */ -GIT_EXTERN(const git_commit_person *) git_commit_committer(git_commit *commit); +GIT_EXTERN(const git_person *) 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_commit_person *) git_commit_author(git_commit *commit); +GIT_EXTERN(const git_person *) git_commit_author(git_commit *commit); /** * Get the tree pointed to by a commit. -- cgit v1.2.1