diff options
author | Vicent Marti <tanoku@gmail.com> | 2010-11-02 18:42:42 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2010-11-02 18:42:42 +0200 |
commit | 6fd195d76c7f52baae5540e287affe2259900d36 (patch) | |
tree | 4dd644c5086dce17827f42b8c811049175da88f9 /tests/t0401-parse.c | |
parent | d80e9d55aa2d0629f7f207db42762494075d7854 (diff) | |
download | libgit2-6fd195d76c7f52baae5540e287affe2259900d36.tar.gz |
Change git_repository initialization to use a path
The constructor to git_repository is now called
'git_repository_open(path)'
and takes a path to a git repository instead of an existing ODB object.
Unit tests have been updated accordingly and the two test repositories
have been merged into one.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'tests/t0401-parse.c')
-rw-r--r-- | tests/t0401-parse.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/t0401-parse.c b/tests/t0401-parse.c index 06427a185..1a2806bf1 100644 --- a/tests/t0401-parse.c +++ b/tests/t0401-parse.c @@ -6,8 +6,6 @@ #include <git/commit.h> #include <git/revwalk.h> -static const char *odb_dir = "../resources/pack-odb"; - static char *test_commits_broken[] = { /* empty commit */ @@ -225,11 +223,8 @@ BEGIN_TEST(parse_buffer_test) int i; git_repository *repo; - git_odb *db; - - must_pass(git_odb_open(&db, odb_dir)); - repo = git_repository_alloc(db); + repo = git_repository_open(REPOSITORY_FOLDER); must_be_true(repo != NULL); for (i = 0; i < broken_commit_count; ++i) { @@ -265,6 +260,4 @@ BEGIN_TEST(parse_buffer_test) } git_repository_free(repo); - git_odb_close(db); - END_TEST |