diff options
| author | Teddy Wing | 2021-05-30 16:39:47 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2021-05-30 16:39:47 +0200 | 
| commit | 4860cd1b0a0390c97d383568fd278b0778872b6f (patch) | |
| tree | 9a56651e894b70e77354b42fe844f457cfadbbcd | |
| parent | 4ce77f3a6e9d29f60f194fbc31068481e13ff293 (diff) | |
| download | reflectub-4860cd1b0a0390c97d383568fd278b0778872b6f.tar.bz2 | |
main: Fetch from repositories that exist and have been updated
| -rw-r--r-- | src/main.rs | 8 | 
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(()) +} | 
