diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-22 06:42:50 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-01-23 09:48:21 -0500 |
commit | 751e9a04fe02662338f66ec9f54b47f77cdf0cdb (patch) | |
tree | d63c2fbc1359aadbae0d7f09e10223b5d64ae5d1 | |
parent | 5a45616c16fcff7051416c64703988c787015259 (diff) | |
download | libgit2-751e9a04fe02662338f66ec9f54b47f77cdf0cdb.tar.gz |
treecache: write the raw id not the object
We explicitly want to write on the id data, not the beginning of the
object data, which may contain other information in the future.
-rw-r--r-- | src/tree-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tree-cache.c b/src/tree-cache.c index 0977c92f3..cd69e7bf8 100644 --- a/src/tree-cache.c +++ b/src/tree-cache.c @@ -263,7 +263,7 @@ static void write_tree(git_str *out, git_tree_cache *tree) git_str_printf(out, "%s%c%"PRIdZ" %"PRIuZ"\n", tree->name, 0, tree->entry_count, tree->children_count); if (tree->entry_count != -1) - git_str_put(out, (const char *) &tree->oid, GIT_OID_RAWSZ); + git_str_put(out, (char *)&tree->oid.id, GIT_OID_RAWSZ); for (i = 0; i < tree->children_count; i++) write_tree(out, tree->children[i]); |