Go to file
Vicent Marti 52f2390b43 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>
2010-07-15 23:40:52 +02:00
src Add external API to access detailed commit attributes 2010-07-15 23:40:52 +02:00
tests Add external API to access detailed commit attributes 2010-07-15 23:40:52 +02:00
.gitignore Makefile: Add support for custom build options in config.mak file 2010-02-28 20:10:35 +00:00
.HEADER Switch the license from BSD to GPL+libgcc exception 2008-11-01 15:55:47 -07:00
api.doxygen Fix "'__thread' not at start of declaration" warnings (-Wextra) 2010-01-20 20:19:06 +00:00
CONVENTIONS Move include files to include/git/, drop git_ prefix from file names 2008-11-01 15:42:23 -07:00
COPYING Switch the license from BSD to GPL+libgcc exception 2008-11-01 15:55:47 -07:00
git.git-authors Correct Adam Simpkins' name 2010-04-15 09:57:58 +02:00
libgit2.pc.in Add support for installing to a libdir other than 'lib'. 2009-02-01 15:00:10 -08:00
Makefile msvc: Disable a level 4 warning and change -W3 to -W4 2010-06-07 19:46:17 +01:00