Function git::testutil::with_temp_repository
source · [−]pub fn with_temp_repository<F>(callback: F) where
F: FnOnce(Repository) -> Result<()>, Expand description
Provides a new repository instance in a temporary directory for testing that contains an initial empty commit.
Panics
If the repository cannot be created for any reason, this function will panic.