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

    let tree = write_index_to_tree(repo)?;

    // Get parent commit
    let parent_commit = get_head_commit(repo)?;

    // Create new commit
    repo.commit(Some("HEAD"), &sig, &sig, message, &tree, &[&parent_commit])
}
/// Create a commit with a message
Create a commit with a message
Create a commit with a message
pub fn create_commit(repo: &Repository, message: &str) -> Result<Oid, Error> {
    // Get user information
    let sig = get_signature(repo)?;
    let tree = write_index_to_tree(repo)?;
    // Get parent commit
    let parent_commit = get_head_commit(repo)?;
    // Create new commit
    repo.commit(Some("HEAD"), &sig, &sig, message, &tree, &[&parent_commit])
}
pub fn create_commit ( repo : & Repository , message : & str ) -> Result < Oid , Error > { // Get user information let sig = get_signature ( repo ) ? ; let tree = write_index_to_tree ( repo ) ? ; // Get parent commit let parent_commit = get_head_commit ( repo ) ? ; // Create new commit repo . commit ( Some ( " " ) , & sig , & sig , message , & tree , & [ & parent_commit ] ) }
Create a commit with a message
Create a commit with a message
repo
&Repository
message
&str
repo
&Repository
message
&str