summaryrefslogtreecommitdiff
path: root/tests/libgit2/iterator
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-01-18 08:12:18 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-04-10 15:56:57 -0400
commitab0421612f045fa2999296facb5fdab373bf7196 (patch)
tree050c66b28e79ca28a7fba7ae58d078f727e2ef6b /tests/libgit2/iterator
parent7e8d9be0cc168c22cbaf1116bd5b27c0a6076565 (diff)
downloadlibgit2-ab0421612f045fa2999296facb5fdab373bf7196.tar.gz
tree: move git_oid into tree entry
A tree entry previously pointed directly into the object id within the tree object itself; this is useful to avoid any unnecessary memory copy (and an unnecessary use of 40 bytes per tree entry) but difficult if we change the underlying `git_oid` object to not simply be a raw object id but have additional structure. This commit moves the `git_oid` directly into the tree entry; this simplifies the tree entry creation from user data. We now copy the `git_oid` into place when parsing.
Diffstat (limited to 'tests/libgit2/iterator')
-rw-r--r--tests/libgit2/iterator/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libgit2/iterator/tree.c b/tests/libgit2/iterator/tree.c
index 4145c8dea..06a920a18 100644
--- a/tests/libgit2/iterator/tree.c
+++ b/tests/libgit2/iterator/tree.c
@@ -268,7 +268,7 @@ static void check_tree_entry(
cl_git_pass(git_iterator_current_tree_entry(&te, i));
cl_assert(te);
- cl_assert(git_oid_streq(te->oid, oid) == 0);
+ cl_assert(git_oid_streq(&te->oid, oid) == 0);
cl_git_pass(git_iterator_current(&ie, i));