diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2023-10-02 04:40:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-10-02 23:57:40 +0200 |
commit | efed687edcaa272601e0f4e192db368972daa7ac (patch) | |
tree | 4324acf56dc0100cc5fa0c14d8e88cf3e337323d /delta-islands.c | |
parent | builtin/cat-file: let the oid determine the output algorithm (diff) | |
download | git-efed687edcaa272601e0f4e192db368972daa7ac.tar.xz git-efed687edcaa272601e0f4e192db368972daa7ac.zip |
tree-walk: init_tree_desc take an oid to get the hash algorithm
To make it possible for git ls-tree to display the tree encoded
in the hash algorithm of the oid specified to git ls-tree, update
init_tree_desc to take as a parameter the oid of the tree object.
Update all callers of init_tree_desc and init_tree_desc_gently
to pass the oid of the tree object.
Use the oid of the tree object to discover the hash algorithm
of the oid and store that hash algorithm in struct tree_desc.
Use the hash algorithm in decode_tree_entry and
update_tree_entry_internal to handle reading a tree object encoded in
a hash algorithm that differs from the repositories hash algorithm.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'delta-islands.c')
-rw-r--r-- | delta-islands.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/delta-islands.c b/delta-islands.c index 5de5759f3f..1ff3506b10 100644 --- a/delta-islands.c +++ b/delta-islands.c @@ -289,7 +289,7 @@ void resolve_tree_islands(struct repository *r, if (!tree || parse_tree(tree) < 0) die(_("bad tree object %s"), oid_to_hex(&ent->idx.oid)); - init_tree_desc(&desc, tree->buffer, tree->size); + init_tree_desc(&desc, &tree->object.oid, tree->buffer, tree->size); while (tree_entry(&desc, &entry)) { struct object *obj; |