diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-01-07 10:20:06 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-01-07 10:20:06 +0200 |
commit | 04ceb1247c7e25c2de6bec15905ae119016741d3 (patch) | |
tree | b69e38d6039ff034922accc0a489036e8332db6e | |
parent | 9edd0af9798215e4459e63862e777218cda72681 (diff) | |
download | riki-04ceb1247c7e25c2de6bec15905ae119016741d3.tar.gz |
refactor: only use GitError in src/git.rs
Sponsored-by: author
-rw-r--r-- | src/git.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,4 +1,3 @@ -use crate::error::SiteError; use regex::Regex; use std::collections::HashMap; use std::path::{Path, PathBuf}; @@ -32,7 +31,7 @@ pub fn git(args: &[&str], cwd: &Path) -> Result<String, GitError> { } } -pub fn git_whatchanged(cwd: &Path) -> Result<HashMap<PathBuf, SystemTime>, SiteError> { +pub fn git_whatchanged(cwd: &Path) -> Result<HashMap<PathBuf, SystemTime>, GitError> { let mut files = HashMap::new(); if cwd.join(".git").is_dir() { let output = git(&["whatchanged", "--pretty=format:%ad", "--date=unix"], cwd)?; @@ -63,7 +62,7 @@ pub fn git_whatchanged(cwd: &Path) -> Result<HashMap<PathBuf, SystemTime>, SiteE Ok(files) } -pub fn git_dirty(cwd: &Path) -> Result<Vec<PathBuf>, SiteError> { +pub fn git_dirty(cwd: &Path) -> Result<Vec<PathBuf>, GitError> { let mut dirty = vec![]; if cwd.join(".git").is_dir() { let output = git(&["status", "--short"], cwd)?; |