diff options
author | Vicent Marti <tanoku@gmail.com> | 2010-07-07 14:56:05 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2010-07-15 23:40:52 +0200 |
commit | 52f2390b4308fe51ecceecbc35a87bf6e74e9aa8 (patch) | |
tree | 15595ebcc29767ee05eb33adb216fc2e92af85f4 /src/git/tree.h | |
parent | 225fe21522a98075bdc18dae90ce459f797ac366 (diff) | |
download | libgit2-52f2390b4308fe51ecceecbc35a87bf6e74e9aa8.tar.gz |
Add external API to access detailed commit attributes
The following new external methods have been added:
GIT_EXTERN(const char *) git_commit_message_short(git_commit *commit);
GIT_EXTERN(const char *) git_commit_message(git_commit *commit);
GIT_EXTERN(time_t) git_commit_time(git_commit *commit);
GIT_EXTERN(const git_commit_person *) git_commit_committer(git_commit *commit);
GIT_EXTERN(const git_commit_person *) git_commit_author(git_commit *commit);
GIT_EXTERN(const git_tree *) git_commit_tree(git_commit *commit);
A new structure, git_commit_person has been added to represent a
commit's author or committer.
The parsing of a commit has been split in two phases.
When adding a commit to the revision pool:
- the commit's ODB object is opened
- its raw contents are parsed for commit TIME, PARENTS and TREE
(the minimal amount of data required to traverse the pool)
- the commit's ODB object is closed
When querying for extended information on a commit:
- the commit's ODB object is reopened
- its raw contents are parsed for the requested information
- the commit's ODB object remains open to handle additional queries
New unit tests have been added for the new functionality:
In t0401-parse: parse_person_test
In t0402-details: query_details_test
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git/tree.h')
0 files changed, 0 insertions, 0 deletions