pub fn update_index() -> Result<(), String> {
    let (_header, items) = index_util::parse_index()?;

    let updated_items = update_index_items(items);

    match index_util::write_index(updated_items) {
        Ok(_) => Ok(()),
        Err(e) => Err(e.to_string()),
    }
}
/// Register file contents in the working tree to the index
///
/// Ignores new files
Register file contents in the working tree to the index
Ignores new files
Register file contents in the working tree to the index Ignores new files
pub fn update_index() -> Result<(), String> {
    let (_header, items) = index_util::parse_index()?;
    let updated_items = update_index_items(items);
    match index_util::write_index(updated_items) {
        Ok(_) => Ok(()),
        Err(e) => Err(e.to_string()),
    }
}
pub fn update_index ( ) -> Result < ( ) , String > { let ( _header , items ) = index_util :: parse_index ( ) ? ; let updated_items = update_index_items ( items ) ; match index_util :: write_index ( updated_items ) { Ok ( _ ) => Ok ( ( ) ) , Err ( e ) => Err ( e . to_string ( ) ) , } }
Register file contents in the working tree to the index
Ignores new files
Register file contents in the working tree to the index Ignores new files