Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
f1ef8ebe
Commit
f1ef8ebe
authored
May 05, 2023
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
odb: test object lookups from git_repository_wrap_odb
parent
30917576
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
+20
-1
tests/libgit2/odb/backend/loose.c
+20
-1
No files found.
tests/libgit2/odb/backend/loose.c
View file @
f1ef8ebe
...
...
@@ -32,7 +32,7 @@ void test_odb_backend_loose__cleanup(void)
cl_fixture_cleanup
(
"testrepo.git"
);
}
void
test_odb_backend_loose__read
(
void
)
void
test_odb_backend_loose__read
_from_odb
(
void
)
{
git_oid
oid
;
git_odb_object
*
obj
;
...
...
@@ -40,4 +40,23 @@ void test_odb_backend_loose__read(void)
cl_git_pass
(
git_oid__fromstr
(
&
oid
,
"1385f264afb75a56a5bec74243be9b367ba4ca08"
,
GIT_OID_SHA1
));
cl_git_pass
(
git_odb_read
(
&
obj
,
_odb
,
&
oid
));
git_odb_object_free
(
obj
);
cl_git_pass
(
git_oid__fromstr
(
&
oid
,
"fd093bff70906175335656e6ce6ae05783708765"
,
GIT_OID_SHA1
));
cl_git_pass
(
git_odb_read
(
&
obj
,
_odb
,
&
oid
));
git_odb_object_free
(
obj
);
}
void
test_odb_backend_loose__read_from_repo
(
void
)
{
git_oid
oid
;
git_blob
*
blob
;
git_tree
*
tree
;
cl_git_pass
(
git_oid__fromstr
(
&
oid
,
"1385f264afb75a56a5bec74243be9b367ba4ca08"
,
GIT_OID_SHA1
));
cl_git_pass
(
git_blob_lookup
(
&
blob
,
_repo
,
&
oid
));
git_blob_free
(
blob
);
cl_git_pass
(
git_oid__fromstr
(
&
oid
,
"fd093bff70906175335656e6ce6ae05783708765"
,
GIT_OID_SHA1
));
cl_git_pass
(
git_tree_lookup
(
&
tree
,
_repo
,
&
oid
));
git_tree_free
(
tree
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment