libgit2/tests
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
..
t0501-objects Added t0501-walk (simple test for all revision pool walking modes) 2010-06-02 10:32:07 +02:00
.gitignore Fix Makefile to correctly handle 'make -j4 test' 2008-11-03 18:42:54 -08:00
Makefile msvc: Disable a level 4 warning and change -W3 to -W4 2010-06-07 19:46:17 +01:00
NAMING Add unit tests for Commit parsing 2010-06-02 10:32:06 +02:00
t0001-errno.c Use a 64 bit off_t throughout the library and tests on POSIX 2010-01-20 20:13:07 +00:00
t0002-refcnt.c Add a mutex and atomic counter abstraction and implementations 2008-12-31 13:36:55 -08:00
t0003-strutil.c Add git__dirname and git__basename utility routines 2009-01-28 12:25:24 -08:00
t0020-dirent.c Fix some coding style issues 2010-02-28 20:09:45 +00:00
t0101-hash.c Rename the test cases to run in specific orders 2008-12-31 11:16:41 -08:00
t0101-oid.c Fix a bug in the git_oid_to_string() function 2010-06-07 19:44:04 +01:00
t0102-objtype.c Fix some coding style issues 2010-02-28 20:09:45 +00:00
t0103-objhash.c Rename the test cases to run in specific orders 2008-12-31 11:16:41 -08:00
t0201-existsloose.c Fix some coding style issues 2010-02-28 20:09:45 +00:00
t0202-readloose.c Use a 64 bit off_t throughout the library and tests on POSIX 2010-01-20 20:13:07 +00:00
t0203-readloose.c Use a 64 bit off_t throughout the library and tests on POSIX 2010-01-20 20:13:07 +00:00
t0301-write.c Fix some coding style issues 2010-02-28 20:09:45 +00:00
t0401-parse.c Add external API to access detailed commit attributes 2010-07-15 23:40:52 +02:00
t0402-details.c Add external API to access detailed commit attributes 2010-07-15 23:40:52 +02:00
t0403-lists.c Style: Do not use (C99) // comments 2010-06-02 11:18:56 +02:00
t0501-walk.c Style: Do not use (C99) // comments 2010-06-02 11:18:56 +02:00
t0502-table.c Add new tests: t0502-table, t0503-tableit 2010-07-15 23:37:05 +02:00
t0503-tableit.c Add new tests: t0502-table, t0503-tableit 2010-07-15 23:37:05 +02:00
test_helpers.c Fix some coding style issues 2010-02-28 20:09:45 +00:00
test_helpers.h Factor out test helper methods for creating/deleting loose objects 2009-03-17 19:06:37 -07:00
test_lib.c Fix some coding style issues 2010-02-28 20:09:45 +00:00
test_lib.h Fix some coding style issues 2010-02-28 20:09:45 +00:00
test_main.c Makefile: Add CFLAGS to the "test_main.c" compile target 2009-06-05 12:12:42 +02:00
tests.supp Add support for running the tests via valgrind 2009-10-13 16:23:54 +01:00