Skip to content
  • Eric W. Biederman's avatar
    tree-walk: init_tree_desc take an oid to get the hash algorithm · efed687e
    Eric W. Biederman authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    efed687e