Add logging (fix #8)

This commit is contained in:
Roey Darwish Dror
2018-06-17 14:17:36 +03:00
parent 0e2fe028e6
commit b3c8044ad3
6 changed files with 187 additions and 22 deletions

View File

@@ -1,9 +1,8 @@
use super::utils::Check;
use super::utils::{which, Check};
use failure::Error;
use std::collections::HashSet;
use std::path::{Path, PathBuf};
use std::process::Command;
use which::which;
pub struct Git {
git: Option<PathBuf>,
@@ -16,9 +15,7 @@ pub struct Repositories<'a> {
impl Git {
pub fn new() -> Self {
Self {
git: which("git").ok(),
}
Self { git: which("git") }
}
pub fn get_repo_root<P: AsRef<Path>>(&self, path: P) -> Option<String> {