fn write_index_to_tree(repo: &Repository) -> Result<Tree, Error> {
    // Create tree from current index
    let tree = {
        // Get repo index
        let mut index = repo.index()?;

        // Write index to a tree
        index.write_tree()?
    };

    // Return tree object
    repo.find_tree(tree)
}
/// Write index to a git tree
Write index to a git tree
Write index to a git tree
fn write_index_to_tree(repo: &Repository) -> Result<Tree, Error> {
    // Create tree from current index
    let tree = {
        // Get repo index
        let mut index = repo.index()?;
        // Write index to a tree
        index.write_tree()?
    };
    // Return tree object
    repo.find_tree(tree)
}
fn write_index_to_tree ( repo : & Repository ) -> Result < Tree , Error > { // Create tree from current index let tree = { // Get repo index let mut index = repo . index ( ) ? ; // Write index to a tree index . write_tree ( ) ? } ; // Return tree object repo . find_tree ( tree ) }
Write index to a git tree
Write index to a git tree
repo
&Repository
repo
&Repository