//! /// Internal impl crate::Repository { #[inline] pub(crate) fn free_buf(&self) -> Vec { self.bufs.borrow_mut().pop().unwrap_or_default() } /// This method is commonly called from the destructor of objects that previously claimed an entry /// in the free-list with `free_buf()`. /// They are welcome to take out the data themselves, for instance when the object is detached, to avoid /// it to be reclaimed. #[inline] pub(crate) fn reuse_buffer(&self, data: &mut Vec) { if data.capacity() > 0 { self.bufs.borrow_mut().push(std::mem::take(data)); } } } mod attributes; mod cache; mod config; mod excludes; pub(crate) mod identity; mod impls; mod init; mod location; mod object; mod reference; mod remote; mod revision; mod shallow; mod snapshots; mod state; mod thread_safe; mod worktree;