[−][src]Function skellige::prelude::git::is_repo
pub fn is_repo<T>(path: T) -> bool where
T: AsRef<Path>,
Returns true if the path
directory is a repositiory
Examples
use skellige::prelude::*; let tmpdir = PathBuf::from("tests/temp").abs().unwrap().mash("git_is_repo_doc"); assert!(sys::remove_all(&tmpdir).is_ok()); assert_eq!(git::is_repo(&tmpdir), false); assert!(git2::Repository::init(&tmpdir).is_ok()); assert_eq!(git::is_repo(&tmpdir), true); assert!(sys::remove_all(&tmpdir).is_ok());