Skip to content

Add a user-friendly way to build trees #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Jake-Shadle opened this issue Jul 6, 2023 · 1 comment
Open

Add a user-friendly way to build trees #924

Jake-Shadle opened this issue Jul 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Jake-Shadle
Copy link
Contributor

Summary 💡

A simple API to manipulate trees more akin to a filesystem would be more intuitive for most common uses of mutable trees.

Motivation 🔦

Currently building trees is fairly manual since Tree is only a single level, as well as having other restrictions

The directories and files contained in this tree. They must be and remain sorted by filename

This feature is available in git2 as TreeUpdateBuilder

@Jake-Shadle Jake-Shadle added the enhancement New feature or request label Jul 6, 2023
@Byron
Copy link
Member

Byron commented Jul 6, 2023

I'd definitely want to have something like TreeUpdateBuilder at some point as well, if only for completeness. I am saying this as I think that an index.to_tree() may happen before this issue is tackled as git add and friends will work with an index. Using an index has further advantages as it can re-use trees that haven't changed thanks to its TREE extension Of course, if every tree is fully generated, or they are small enough, there probably wouldn't be much of a benefit.

In any case, I will keep it in mind and see that I can make it happen maybe even before the cargo integration is done (cargo doesn't seem to be building trees (yet)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants