|
d4b5a4e2
|
2011-02-09T19:49:02
|
|
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>
|
|
c041af95
|
2011-02-05T19:45:57
|
|
Add support for SQLite backends
Configure again the build system to look for SQLite3. If the library is
found, the SQLite backend will be automatically compiled.
Enjoy *very* fast reads and writes.
MASTER PROTIP: Initialize the backend with ":memory" as the path to the
SQLite database for fully-hosted in-memory repositories. Rejoice.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
87d82994
|
2011-02-02T02:32:21
|
|
Make the test return an error code on failure
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
2a1732b4
|
2011-02-02T02:15:25
|
|
Rewrite the unit testing suite
NIH Enterprises presents: a new testing system based on CuTesT, which is
faster than our previous one and fortunately uses no preprocessing on
the source files, which means we can run that from CMake.
The test suites have been gathered together into bigger files (one file
per suite, testing each of the different submodules of the library).
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
5b8bb8e7
|
2010-12-07T00:54:33
|
|
Minor modifications for MinGW/Cygwin compatibility.
|
|
59995558
|
2010-12-02T21:48:03
|
|
Fix segfault handler in Mac OS X
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
1e35f929
|
2010-12-02T04:19:14
|
|
Add stack trace to the tests when building with GCC
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|
|
cf33ac7a
|
2009-06-04T17:10:17
|
|
Makefile: Add CFLAGS to the "test_main.c" compile target
Also, add the <string.h> include to test_main.c, in order to
suppress the resulting "implicit declaration of strcmp()" warning.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Andreas Ericsson <ae@op5.se>
|
|
b923f2f9
|
2008-11-03T17:00:54
|
|
Fix Makefile to correctly handle 'make -j4 test'
If we have more than one test build running we cannot use the same
file for each test case; instead we need to use a per-test path so
there aren't any collisions.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
b81dd80e
|
2008-11-03T18:38:12
|
|
Change test_main to run a single test case out of the suite
By passing the name of the test function on the command line
we execute exactly that one test, and then exit successfully
if the test did not fail. This permits multiple functions in
the same .c file, so they could be called from a shell script
or debugged independently externally.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|
|
15bffce9
|
2008-11-01T18:14:22
|
|
Create a basic test suite for the library and test oid functions
This is a horribly simple test suite that makes it fairly easy to
put together some basic function level unit tests on the library.
Its patterned somewhat after the test suite in git.git, but also
after the "Check" test library.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
|