diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-12-03 18:01:30 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-12-06 01:14:15 +0200 |
| commit | 7d7cd8857a451ff50b126e452bcbdc0fb397db35 (patch) | |
| tree | c9ddb750041ef6d22e8fef955df71dd6e7f2973f /tests | |
| parent | 86bfec39b55c00ef499e635fdbdca7946c55fcde (diff) | |
| download | libgit2-7d7cd8857a451ff50b126e452bcbdc0fb397db35.tar.gz | |
Decouple storage from ODB logic
Comes with two default backends: loose object and packfiles.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/t0102-objtype.c | 74 | ||||
| -rw-r--r-- | tests/t0103-objhash.c | 28 | ||||
| -rw-r--r-- | tests/t0202-readloose.c | 28 | ||||
| -rw-r--r-- | tests/t0203-readloose.c | 28 | ||||
| -rw-r--r-- | tests/t0204-readpack.c | 4 | ||||
| -rw-r--r-- | tests/t0205-readheader.c | 4 | ||||
| -rw-r--r-- | tests/t0301-write.c | 28 | ||||
| -rw-r--r-- | tests/test_helpers.c | 2 |
8 files changed, 98 insertions, 98 deletions
diff --git a/tests/t0102-objtype.c b/tests/t0102-objtype.c index b42f3f731..a234798ea 100644 --- a/tests/t0102-objtype.c +++ b/tests/t0102-objtype.c @@ -3,48 +3,48 @@ #include <git/odb.h> BEGIN_TEST(type_to_string) - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ_BAD), "")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ__EXT1), "")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ_COMMIT), "commit")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ_TREE), "tree")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ_BLOB), "blob")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ_TAG), "tag")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ__EXT2), "")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ_OFS_DELTA), "OFS_DELTA")); - must_be_true(!strcmp(git_obj_type_to_string(GIT_OBJ_REF_DELTA), "REF_DELTA")); - - must_be_true(!strcmp(git_obj_type_to_string(-2), "")); - must_be_true(!strcmp(git_obj_type_to_string(8), "")); - must_be_true(!strcmp(git_obj_type_to_string(1234), "")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ_BAD), "")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ__EXT1), "")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ_COMMIT), "commit")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ_TREE), "tree")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ_BLOB), "blob")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ_TAG), "tag")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ__EXT2), "")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ_OFS_DELTA), "OFS_DELTA")); + must_be_true(!strcmp(git_otype_tostring(GIT_OBJ_REF_DELTA), "REF_DELTA")); + + must_be_true(!strcmp(git_otype_tostring(-2), "")); + must_be_true(!strcmp(git_otype_tostring(8), "")); + must_be_true(!strcmp(git_otype_tostring(1234), "")); END_TEST BEGIN_TEST(string_to_type) - must_be_true(git_obj_string_to_type(NULL) == GIT_OBJ_BAD); - must_be_true(git_obj_string_to_type("") == GIT_OBJ_BAD); - must_be_true(git_obj_string_to_type("commit") == GIT_OBJ_COMMIT); - must_be_true(git_obj_string_to_type("tree") == GIT_OBJ_TREE); - must_be_true(git_obj_string_to_type("blob") == GIT_OBJ_BLOB); - must_be_true(git_obj_string_to_type("tag") == GIT_OBJ_TAG); - must_be_true(git_obj_string_to_type("OFS_DELTA") == GIT_OBJ_OFS_DELTA); - must_be_true(git_obj_string_to_type("REF_DELTA") == GIT_OBJ_REF_DELTA); - - must_be_true(git_obj_string_to_type("CoMmIt") == GIT_OBJ_BAD); - must_be_true(git_obj_string_to_type("hohoho") == GIT_OBJ_BAD); + must_be_true(git_otype_fromstring(NULL) == GIT_OBJ_BAD); + must_be_true(git_otype_fromstring("") == GIT_OBJ_BAD); + must_be_true(git_otype_fromstring("commit") == GIT_OBJ_COMMIT); + must_be_true(git_otype_fromstring("tree") == GIT_OBJ_TREE); + must_be_true(git_otype_fromstring("blob") == GIT_OBJ_BLOB); + must_be_true(git_otype_fromstring("tag") == GIT_OBJ_TAG); + must_be_true(git_otype_fromstring("OFS_DELTA") == GIT_OBJ_OFS_DELTA); + must_be_true(git_otype_fromstring("REF_DELTA") == GIT_OBJ_REF_DELTA); + + must_be_true(git_otype_fromstring("CoMmIt") == GIT_OBJ_BAD); + must_be_true(git_otype_fromstring("hohoho") == GIT_OBJ_BAD); END_TEST BEGIN_TEST(loose_object) - must_be_true(git_obj__loose_object_type(GIT_OBJ_BAD) == 0); - must_be_true(git_obj__loose_object_type(GIT_OBJ__EXT1) == 0); - must_be_true(git_obj__loose_object_type(GIT_OBJ_COMMIT) == 1); - must_be_true(git_obj__loose_object_type(GIT_OBJ_TREE) == 1); - must_be_true(git_obj__loose_object_type(GIT_OBJ_BLOB) == 1); - must_be_true(git_obj__loose_object_type(GIT_OBJ_TAG) == 1); - must_be_true(git_obj__loose_object_type(GIT_OBJ__EXT2) == 0); - must_be_true(git_obj__loose_object_type(GIT_OBJ_OFS_DELTA) == 0); - must_be_true(git_obj__loose_object_type(GIT_OBJ_REF_DELTA) == 0); - - must_be_true(git_obj__loose_object_type(-2) == 0); - must_be_true(git_obj__loose_object_type(8) == 0); - must_be_true(git_obj__loose_object_type(1234) == 0); + must_be_true(git_otype_is_loose(GIT_OBJ_BAD) == 0); + must_be_true(git_otype_is_loose(GIT_OBJ__EXT1) == 0); + must_be_true(git_otype_is_loose(GIT_OBJ_COMMIT) == 1); + must_be_true(git_otype_is_loose(GIT_OBJ_TREE) == 1); + must_be_true(git_otype_is_loose(GIT_OBJ_BLOB) == 1); + must_be_true(git_otype_is_loose(GIT_OBJ_TAG) == 1); + must_be_true(git_otype_is_loose(GIT_OBJ__EXT2) == 0); + must_be_true(git_otype_is_loose(GIT_OBJ_OFS_DELTA) == 0); + must_be_true(git_otype_is_loose(GIT_OBJ_REF_DELTA) == 0); + + must_be_true(git_otype_is_loose(-2) == 0); + must_be_true(git_otype_is_loose(8) == 0); + must_be_true(git_otype_is_loose(1234) == 0); END_TEST diff --git a/tests/t0103-objhash.c b/tests/t0103-objhash.c index 8d0ba903e..94c5e85af 100644 --- a/tests/t0103-objhash.c +++ b/tests/t0103-objhash.c @@ -326,28 +326,28 @@ BEGIN_TEST(hash_junk) /* invalid types: */ junk_obj.data = some_data; - must_fail(git_obj_hash(&id, &junk_obj)); + must_fail(git_rawobj_hash(&id, &junk_obj)); junk_obj.type = GIT_OBJ__EXT1; - must_fail(git_obj_hash(&id, &junk_obj)); + must_fail(git_rawobj_hash(&id, &junk_obj)); junk_obj.type = GIT_OBJ__EXT2; - must_fail(git_obj_hash(&id, &junk_obj)); + must_fail(git_rawobj_hash(&id, &junk_obj)); junk_obj.type = GIT_OBJ_OFS_DELTA; - must_fail(git_obj_hash(&id, &junk_obj)); + must_fail(git_rawobj_hash(&id, &junk_obj)); junk_obj.type = GIT_OBJ_REF_DELTA; - must_fail(git_obj_hash(&id, &junk_obj)); + must_fail(git_rawobj_hash(&id, &junk_obj)); /* data can be NULL only if len is zero: */ junk_obj.type = GIT_OBJ_BLOB; junk_obj.data = NULL; - must_pass(git_obj_hash(&id, &junk_obj)); + must_pass(git_rawobj_hash(&id, &junk_obj)); must_be_true(git_oid_cmp(&id, &id_zero) == 0); junk_obj.len = 1; - must_fail(git_obj_hash(&id, &junk_obj)); + must_fail(git_rawobj_hash(&id, &junk_obj)); END_TEST BEGIN_TEST(hash_commit) @@ -355,7 +355,7 @@ BEGIN_TEST(hash_commit) must_pass(git_oid_mkstr(&id1, commit_id)); - must_pass(git_obj_hash(&id2, &commit_obj)); + must_pass(git_rawobj_hash(&id2, &commit_obj)); must_be_true(git_oid_cmp(&id1, &id2) == 0); END_TEST @@ -365,7 +365,7 @@ BEGIN_TEST(hash_tree) must_pass(git_oid_mkstr(&id1, tree_id)); - must_pass(git_obj_hash(&id2, &tree_obj)); + must_pass(git_rawobj_hash(&id2, &tree_obj)); must_be_true(git_oid_cmp(&id1, &id2) == 0); END_TEST @@ -375,7 +375,7 @@ BEGIN_TEST(hash_tag) must_pass(git_oid_mkstr(&id1, tag_id)); - must_pass(git_obj_hash(&id2, &tag_obj)); + must_pass(git_rawobj_hash(&id2, &tag_obj)); must_be_true(git_oid_cmp(&id1, &id2) == 0); END_TEST @@ -385,7 +385,7 @@ BEGIN_TEST(hash_zero) must_pass(git_oid_mkstr(&id1, zero_id)); - must_pass(git_obj_hash(&id2, &zero_obj)); + must_pass(git_rawobj_hash(&id2, &zero_obj)); must_be_true(git_oid_cmp(&id1, &id2) == 0); END_TEST @@ -395,7 +395,7 @@ BEGIN_TEST(hash_one) must_pass(git_oid_mkstr(&id1, one_id)); - must_pass(git_obj_hash(&id2, &one_obj)); + must_pass(git_rawobj_hash(&id2, &one_obj)); must_be_true(git_oid_cmp(&id1, &id2) == 0); END_TEST @@ -405,7 +405,7 @@ BEGIN_TEST(hash_two) must_pass(git_oid_mkstr(&id1, two_id)); - must_pass(git_obj_hash(&id2, &two_obj)); + must_pass(git_rawobj_hash(&id2, &two_obj)); must_be_true(git_oid_cmp(&id1, &id2) == 0); END_TEST @@ -415,7 +415,7 @@ BEGIN_TEST(hash_some) must_pass(git_oid_mkstr(&id1, some_id)); - must_pass(git_obj_hash(&id2, &some_obj)); + must_pass(git_rawobj_hash(&id2, &some_obj)); must_be_true(git_oid_cmp(&id1, &id2) == 0); END_TEST diff --git a/tests/t0202-readloose.c b/tests/t0202-readloose.c index 3cb99e4da..9956b3cd9 100644 --- a/tests/t0202-readloose.c +++ b/tests/t0202-readloose.c @@ -532,10 +532,10 @@ BEGIN_TEST(read_loose_commit) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, commit.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &commit)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &commit)); END_TEST @@ -549,10 +549,10 @@ BEGIN_TEST(read_loose_tree) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, tree.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &tree)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &tree)); END_TEST @@ -566,10 +566,10 @@ BEGIN_TEST(read_loose_tag) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, tag.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &tag)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &tag)); END_TEST @@ -583,10 +583,10 @@ BEGIN_TEST(read_loose_zero) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, zero.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &zero)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &zero)); END_TEST @@ -600,10 +600,10 @@ BEGIN_TEST(read_loose_one) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, one.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &one)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &one)); END_TEST @@ -617,10 +617,10 @@ BEGIN_TEST(read_loose_two) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, two.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &two)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &two)); END_TEST @@ -634,10 +634,10 @@ BEGIN_TEST(read_loose_some) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, some.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &some)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &some)); END_TEST diff --git a/tests/t0203-readloose.c b/tests/t0203-readloose.c index 5952c2ee3..3b1728b5a 100644 --- a/tests/t0203-readloose.c +++ b/tests/t0203-readloose.c @@ -533,10 +533,10 @@ BEGIN_TEST(read_loose_commit) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, commit.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &commit)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &commit)); END_TEST @@ -550,10 +550,10 @@ BEGIN_TEST(read_loose_tree) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, tree.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &tree)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &tree)); END_TEST @@ -567,10 +567,10 @@ BEGIN_TEST(read_loose_tag) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, tag.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &tag)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &tag)); END_TEST @@ -584,10 +584,10 @@ BEGIN_TEST(read_loose_zero) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, zero.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &zero)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &zero)); END_TEST @@ -601,10 +601,10 @@ BEGIN_TEST(read_loose_one) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, one.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &one)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &one)); END_TEST @@ -618,10 +618,10 @@ BEGIN_TEST(read_loose_two) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, two.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &two)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &two)); END_TEST @@ -635,10 +635,10 @@ BEGIN_TEST(read_loose_some) must_pass(git_odb_open(&db, odb_dir)); must_pass(git_oid_mkstr(&id, some.id)); - must_pass(git_odb__read_loose(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); must_pass(cmp_objects(&obj, &some)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(odb_dir, &some)); END_TEST diff --git a/tests/t0204-readpack.c b/tests/t0204-readpack.c index 44694543a..a7c8db7e0 100644 --- a/tests/t0204-readpack.c +++ b/tests/t0204-readpack.c @@ -143,9 +143,9 @@ BEGIN_TEST(readpacked_test) must_pass(git_oid_mkstr(&id, packed_objects[i])); must_be_true(git_odb_exists(db, &id) == 1); - must_pass(git_odb__read_packed(&obj, db, &id)); + must_pass(git_odb_read(&obj, db, &id)); - git_obj_close(&obj); + git_rawobj_close(&obj); } git_odb_close(db); diff --git a/tests/t0205-readheader.c b/tests/t0205-readheader.c index 626c5a5ac..f82e57c44 100644 --- a/tests/t0205-readheader.c +++ b/tests/t0205-readheader.c @@ -172,7 +172,7 @@ BEGIN_TEST(readheader_packed_test) must_be_true(obj.len == header.len); must_be_true(obj.type == header.type); - git_obj_close(&obj); + git_rawobj_close(&obj); } git_odb_close(db); @@ -199,7 +199,7 @@ BEGIN_TEST(readheader_loose_test) must_be_true(obj.len == header.len); must_be_true(obj.type == header.type); - git_obj_close(&obj); + git_rawobj_close(&obj); } git_odb_close(db); diff --git a/tests/t0301-write.c b/tests/t0301-write.c index 6c995bb5a..e0bbae1b8 100644 --- a/tests/t0301-write.c +++ b/tests/t0301-write.c @@ -414,10 +414,10 @@ BEGIN_TEST(write_commit) must_be_true(git_oid_cmp(&id1, &id2) == 0); must_pass(check_object_files(&commit)); - must_pass(git_odb__read_loose(&obj, db, &id1)); + must_pass(git_odb_read(&obj, db, &id1)); must_pass(cmp_objects(&obj, &commit_obj)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(&commit)); END_TEST @@ -435,10 +435,10 @@ BEGIN_TEST(write_tree) must_be_true(git_oid_cmp(&id1, &id2) == 0); must_pass(check_object_files(&tree)); - must_pass(git_odb__read_loose(&obj, db, &id1)); + must_pass(git_odb_read(&obj, db, &id1)); must_pass(cmp_objects(&obj, &tree_obj)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(&tree)); END_TEST @@ -456,10 +456,10 @@ BEGIN_TEST(write_tag) must_be_true(git_oid_cmp(&id1, &id2) == 0); must_pass(check_object_files(&tag)); - must_pass(git_odb__read_loose(&obj, db, &id1)); + must_pass(git_odb_read(&obj, db, &id1)); must_pass(cmp_objects(&obj, &tag_obj)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(&tag)); END_TEST @@ -477,10 +477,10 @@ BEGIN_TEST(write_zero) must_be_true(git_oid_cmp(&id1, &id2) == 0); must_pass(check_object_files(&zero)); - must_pass(git_odb__read_loose(&obj, db, &id1)); + must_pass(git_odb_read(&obj, db, &id1)); must_pass(cmp_objects(&obj, &zero_obj)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(&zero)); END_TEST @@ -498,10 +498,10 @@ BEGIN_TEST(write_one) must_be_true(git_oid_cmp(&id1, &id2) == 0); must_pass(check_object_files(&one)); - must_pass(git_odb__read_loose(&obj, db, &id1)); + must_pass(git_odb_read(&obj, db, &id1)); must_pass(cmp_objects(&obj, &one_obj)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(&one)); END_TEST @@ -519,10 +519,10 @@ BEGIN_TEST(write_two) must_be_true(git_oid_cmp(&id1, &id2) == 0); must_pass(check_object_files(&two)); - must_pass(git_odb__read_loose(&obj, db, &id1)); + must_pass(git_odb_read(&obj, db, &id1)); must_pass(cmp_objects(&obj, &two_obj)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(&two)); END_TEST @@ -540,10 +540,10 @@ BEGIN_TEST(write_some) must_be_true(git_oid_cmp(&id1, &id2) == 0); must_pass(check_object_files(&some)); - must_pass(git_odb__read_loose(&obj, db, &id1)); + must_pass(git_odb_read(&obj, db, &id1)); must_pass(cmp_objects(&obj, &some_obj)); - git_obj_close(&obj); + git_rawobj_close(&obj); git_odb_close(db); must_pass(remove_object_files(&some)); END_TEST diff --git a/tests/test_helpers.c b/tests/test_helpers.c index 86192233a..cd14c0e29 100644 --- a/tests/test_helpers.c +++ b/tests/test_helpers.c @@ -125,7 +125,7 @@ int remove_loose_object(const char *repository_folder, git_object *object) int cmp_objects(git_rawobj *o, object_data *d) { - if (o->type != git_obj_string_to_type(d->type)) + if (o->type != git_otype_fromstring(d->type)) return -1; if (o->len != d->dlen) return -1; |
