aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeddy Wing2021-05-30 16:39:47 +0200
committerTeddy Wing2021-05-30 16:39:47 +0200
commit4860cd1b0a0390c97d383568fd278b0778872b6f (patch)
tree9a56651e894b70e77354b42fe844f457cfadbbcd /src
parent4ce77f3a6e9d29f60f194fbc31068481e13ff293 (diff)
downloadreflectub-4860cd1b0a0390c97d383568fd278b0778872b6f.tar.bz2
main: Fetch from repositories that exist and have been updated
Diffstat (limited to 'src')
-rw-r--r--src/main.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index d56ffdd..e7d8430 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -64,7 +64,7 @@ async fn main() {
match db.repo_get(id).await {
Ok(r) => {
if db.repo_is_updated(&db_repo).await.unwrap() {
- // TODO: fetch
+ update(&path).unwrap();
db.repo_update(&db_repo).await.unwrap();
}
@@ -113,3 +113,9 @@ fn mirror<P: AsRef<Path>>(
Ok(())
}
+
+fn update<P: AsRef<Path>>(repo_path: P) -> anyhow::Result<()> {
+ git::update(repo_path)?;
+
+ Ok(())
+}