diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-18 08:12:18 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-04-10 15:56:57 -0400 |
| commit | ab0421612f045fa2999296facb5fdab373bf7196 (patch) | |
| tree | 050c66b28e79ca28a7fba7ae58d078f727e2ef6b /tests/libgit2/object | |
| parent | 7e8d9be0cc168c22cbaf1116bd5b27c0a6076565 (diff) | |
| download | libgit2-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/object')
| -rw-r--r-- | tests/libgit2/object/tree/parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libgit2/object/tree/parse.c b/tests/libgit2/object/tree/parse.c index 9d76a74f0..4e871dcfa 100644 --- a/tests/libgit2/object/tree/parse.c +++ b/tests/libgit2/object/tree/parse.c @@ -40,7 +40,7 @@ static void assert_tree_parses(const char *data, size_t datalen, cl_assert(entry = git_tree_entry_byname(tree, expected->filename)); cl_assert_equal_s(expected->filename, entry->filename); cl_assert_equal_i(expected->attr, entry->attr); - cl_assert_equal_oid(&oid, entry->oid); + cl_assert_equal_oid(&oid, &entry->oid); } git_object_free(&tree->object); |
