Skip to content

List all commits and files changed between commits #613

Answered by Byron
vbrandl asked this question in Q&A
Discussion options

You must be logged in to vote

Here is how an empty tree of the correct type can be obtained by hand:

        repo.find_object(git::hash::ObjectId::empty_tree(repo.object_hash()))
            .expect("always present")
            .into_tree()

Just now I also added a new method, Repository::empty_tree() to do exactly that.
I hope that helps.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #612 on November 20, 2022 16:27.