summaryrefslogtreecommitdiff
path: root/src/commit.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-08-07 00:59:58 +0200
committerVicent Marti <tanoku@gmail.com>2010-08-07 00:59:58 +0200
commit364788e1d114a174dd3c6fdfd3aa16d9627551b2 (patch)
treececae822706ee4ddd4c661e11de9634547c8e766 /src/commit.h
parent7e4f56a5bb4a87cd9537821ba4ccd1f642481a0a (diff)
downloadlibgit2-364788e1d114a174dd3c6fdfd3aa16d9627551b2.tar.gz
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 <tanoku@gmail.com>
Diffstat (limited to 'src/commit.h')
-rw-r--r--src/commit.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commit.h b/src/commit.h
index 36fd65cf2..028c83712 100644
--- a/src/commit.h
+++ b/src/commit.h
@@ -40,8 +40,8 @@ struct git_commit {
git_commit_list parents;
git_tree *tree;
- git_commit_person *author;
- git_commit_person *committer;
+ git_person *author;
+ git_person *committer;
char *message;
char *message_short;
@@ -58,11 +58,11 @@ struct git_commit {
void git_commit__free(git_commit *c);
int git_commit__parse(git_commit *commit, unsigned int flags, int close_odb);
int git_commit__parse_basic(git_commit *commit);
-int git_commit__parse_oid(git_oid *oid, char **buffer_out, const char *buffer_end, const char *header);
int git_commit__parse_buffer(git_commit *commit, void *data, size_t len, unsigned int parse_flags);
-int git_commit__parse_person(git_commit_person *person, char **buffer_out, const char *buffer_end, const char *header);
void git_commit__mark_uninteresting(git_commit *commit);
+int git__parse_oid(git_oid *oid, char **buffer_out, const char *buffer_end, const char *header);
+int git__parse_person(git_person *person, char **buffer_out, const char *buffer_end, const char *header);
int git_commit_list_push_back(git_commit_list *list, git_commit *commit);
int git_commit_list_push_front(git_commit_list *list, git_commit *commit);