summaryrefslogtreecommitdiff
path: root/tests/t0402-details.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-11-02 18:42:42 +0200
committerVicent Marti <tanoku@gmail.com>2010-11-02 18:42:42 +0200
commit6fd195d76c7f52baae5540e287affe2259900d36 (patch)
tree4dd644c5086dce17827f42b8c811049175da88f9 /tests/t0402-details.c
parentd80e9d55aa2d0629f7f207db42762494075d7854 (diff)
downloadlibgit2-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/t0402-details.c')
-rw-r--r--tests/t0402-details.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/t0402-details.c b/tests/t0402-details.c
index 1e002942b..d60b6481b 100644
--- a/tests/t0402-details.c
+++ b/tests/t0402-details.c
@@ -7,7 +7,6 @@
#include <git/commit.h>
#include <git/revwalk.h>
-static const char *odb_dir = "../resources/sample-odb";
static const char *commit_ids[] = {
"a4a7dce85cf63874e984719f4fdd239f5145052f", /* 0 */
"9fd738e8f7967c078dceed8190330fc8648ee56a", /* 1 */
@@ -21,14 +20,10 @@ BEGIN_TEST(query_details_test)
const size_t commit_count = sizeof(commit_ids) / sizeof(const char *);
unsigned int i;
- git_odb *db;
git_repository *repo;
- 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 < commit_count; ++i) {
git_oid id;
@@ -59,5 +54,4 @@ BEGIN_TEST(query_details_test)
}
git_repository_free(repo);
- git_odb_close(db);
END_TEST