/// List all the files on the newest commit of the current branch.
List all the files on the newest commit of the current branch.
List all the files on the newest commit of the current branch .
pub fn files(&'a self, mut cb: impl FnMut(File<'_>) -> Result<(), Error>) -> Result<(), Error> {
        let mut result = Ok(());
        self.tree
            .walk(git2::TreeWalkMode::PreOrder, |path, entry| {
                result = cb(File {
                    branch: self,
                    path,
                    entry: entry.into(),
                });
                if result.is_err() {
                    git2::TreeWalkResult::Abort
                } else {
                    git2::TreeWalkResult::Ok
                }
            })?;
        result
    }
pub fn files ( & ' a self , mut cb : impl FnMut ( File < ' _ > ) -> Result < ( ) , Error > ) -> Result < ( ) , Error > { let mut result = Ok ( ( ) ) ; self . tree . walk ( git2 :: TreeWalkMode :: PreOrder , | path , entry | { result = cb ( File { branch : self , path , entry : entry . into ( ) , } ) ; if result . is_err ( ) { git2 :: TreeWalkResult :: Abort } else { git2 :: TreeWalkResult :: Ok } } ) ? ; result }
List all the files on the newest commit of the current branch.
List all the files on the newest commit of the current branch .
&'a self
cb
impl FnMut(File<'_>) -> Result<(), Error>