fn prompt_commit_message() -> GitResult<Option<String>> {
    // Create file
    {
        let mut file = File::create(".git/COMMIT_EDITMSG")?;
        file.write(b"
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.\n")?;
    }

    // Drop the user into vim
    Command::new("vim")
                 .arg(".git/COMMIT_EDITMSG")
                 .status()?;

    // Read and parse the file
    let file = File::open(".git/COMMIT_EDITMSG")?;
    parse_commit_message(file)
}
// Drop the user into vim so they can write a commit message
Drop the user into vim so they can write a commit message
Drop the user into vim so they can write a commit message
fn prompt_commit_message() -> GitResult<Option<String>> {
    // Create file
    {
        let mut file = File::create(".git/COMMIT_EDITMSG")?;
        file.write(b"
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.\n")?;
    }
    // Drop the user into vim
    Command::new("vim")
                 .arg(".git/COMMIT_EDITMSG")
                 .status()?;
    // Read and parse the file
    let file = File::open(".git/COMMIT_EDITMSG")?;
    parse_commit_message(file)
}
fn prompt_commit_message ( ) -> GitResult < Option < String > > { // Create file { let mut file = File :: create ( " " ) ? ; file . write ( b" \n " ) ? ; } // Drop the user into vim Command :: new ( " " ) . arg ( " " ) . status ( ) ? ; // Read and parse the file let file = File :: open ( " " ) ? ; parse_commit_message ( file ) }
Drop the user into vim so they can write a commit message
Drop the user into vim so they can write a commit message