Skip to content

Conversation

@Keno
Copy link
Member

@Keno Keno commented Oct 30, 2025

This adds a new constructor GitTree(repo::GitRepo, tree_oid::GitHash) that directly wraps the libgit2 git_tree_lookup function. This provides a more efficient and direct way to create a GitTree object when you already have the tree hash, complementing the existing constructor that creates a GitTree from a GitCommit.

Written by Claude.

This adds a new constructor GitTree(repo::GitRepo, tree_oid::GitHash) that directly
wraps the libgit2 git_tree_lookup function. This provides a more efficient and direct
way to create a GitTree object when you already have the tree hash, complementing the
existing constructor that creates a GitTree from a GitCommit.

The new constructor follows the established patterns in the LibGit2 module, including
proper error handling with @check and initialization with ensure_initialized().
@Keno Keno added the libgit2 The libgit2 library or the LibGit2 stdlib module label Oct 30, 2025
@Keno Keno merged commit 65ffa10 into JuliaLang:master Nov 1, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libgit2 The libgit2 library or the LibGit2 stdlib module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant