libgit2/tests
Vicent Marti d4b5a4e23a Internal changes on the backend system
The priority value for different backends has been removed from the
public `git_odb_backend` struct. We handle that internally. The priority
value is specified on the `git_odb_add_alternate`.

This is convenient because it allows us to poll a backend twice with
different priorities without having to instantiate it twice.

We also differentiate between main backends and alternates; alternates have
lower priority and cannot be written to.

These changes come with some unit tests to make sure that the backend
sorting is consistent.

The libgit2 version has been bumped to 0.4.0.

This commit changes the external API:

CHANGED:
	struct git_odb_backend
		No longer has a `priority` attribute; priority for the backend
		in managed internally by the library.

	git_odb_add_backend(git_odb *odb, git_odb_backend *backend, int priority)
		Now takes an additional priority parameter, the priority that
		will be given to the backend.

ADDED:
	git_odb_add_alternate(git_odb *odb, git_odb_backend *backend, int priority)
		Add a backend as an alternate. Alternate backends have always
		lower priority than main backends, and writing is disabled on
		them.

Signed-off-by: Vicent Marti <tanoku@gmail.com>

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-02-09 19:49:38 +02:00
..
resources Enforced refs handling tests. 2011-02-05 15:24:08 +01:00
.gitignore Fix Makefile to correctly handle 'make -j4 test' 2008-11-03 18:42:54 -08:00
NAMING Merge nulltoken's reference parsing code 2011-01-29 03:39:02 +02:00
t00-core.c Use the new git__joinpath to build paths in methods 2011-02-09 12:43:19 +02:00
t01-data.h Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t01-rawobj.c Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t02-data.h Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t02-objread.c Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t02-oids.h Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t03-objwrite.c Add support for SQLite backends 2011-02-05 19:45:57 +02:00
t04-commit.c Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t05-revwalk.c Make more methods return error codes 2011-02-05 09:29:37 +02:00
t06-index.c Made test index_write_test() remove the test file it has created. 2011-02-05 19:23:51 +01:00
t07-hashtable.c Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t08-tag.c Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t09-tree.c Rewrite the unit testing suite 2011-02-02 02:15:25 +02:00
t10-refs.c Use the new git__joinpath to build paths in methods 2011-02-09 12:43:19 +02:00
t11-sqlite.c Internal changes on the backend system 2011-02-09 19:49:38 +02:00
t12-repo.c Internal changes on the backend system 2011-02-09 19:49:38 +02:00
test_helpers.c Change include structure for the project 2010-12-06 01:14:15 +02:00
test_helpers.h Tests now run with the resources folder as a hardcoded path 2010-12-10 05:53:39 +02:00
test_lib.c Make the test return an error code on failure 2011-02-02 02:32:21 +02:00
test_lib.h Make the test return an error code on failure 2011-02-02 02:32:21 +02:00
test_main.c Internal changes on the backend system 2011-02-09 19:49:38 +02:00
tests.supp Add support for running the tests via valgrind 2009-10-13 16:23:54 +01:00