fn create_initial_commit(repo: &Repository) -> Result<(), Error> {
    // Get user information
    let sig = get_signature(repo)?;

    let tree = write_index_to_tree(repo)?;

    // Make commit with no parent commits and with empty tree (since it's the first one)
    repo.commit(Some("HEAD"), &sig, &sig, "Initial commit", &tree, &[])?;

    Ok(())
}
/// Create initial commit with no files
Create initial commit with no files
Create initial commit with no files
fn create_initial_commit(repo: &Repository) -> Result<(), Error> {
    // Get user information
    let sig = get_signature(repo)?;
    let tree = write_index_to_tree(repo)?;
    // Make commit with no parent commits and with empty tree (since it's the first one)
    repo.commit(Some("HEAD"), &sig, &sig, "Initial commit", &tree, &[])?;
    Ok(())
}
fn create_initial_commit ( repo : & Repository ) -> Result < ( ) , Error > { // Get user information let sig = get_signature ( repo ) ? ; let tree = write_index_to_tree ( repo ) ? ; // Make commit with no parent commits and with empty tree (since it's the first one) repo . commit ( Some ( " " ) , & sig , & sig , " " , & tree , & [ ] ) ? ; Ok ( ( ) ) }
Create initial commit with no files
Create initial commit with no files
repo
&Repository
repo
&Repository