Add config file with support for custom commands and git repos, fix #1

This commit is contained in:
Dror Levin
2018-06-08 18:19:07 +03:00
committed by Roey Darwish Dror
parent 13812ec250
commit bf301f51cd
6 changed files with 153 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
use super::Check;
use failure::Error;
use std::collections::HashSet;
use std::path::{Path, PathBuf};
use std::process::Command;
use which::which;
@@ -55,4 +56,10 @@ impl Git {
Ok(None)
}
pub fn insert_if_valid<P: AsRef<Path>>(&self, git_repos: &mut HashSet<String>, path: P) {
if let Some(repo) = self.get_repo_root(path) {
git_repos.insert(repo);
}
}
}