aboutsummaryrefslogtreecommitdiffstats
path: root/Cargo.toml
AgeCommit message (Collapse)Author
2021-06-06Make repo mirroring multi-threadedTeddy Wing
I think, at least. Took a lot of research and trial and error to get this to compile, working out how to set up the multi-threading for async code. The idea here is to be able to process each repo in potentially multiple threads and do that processing work in parallel.
2021-06-05Add command line option parsingTeddy Wing
Define the options we want to take. Not using them yet.
2021-05-30Set repository mtime to GitHub `updated_at` timeTeddy Wing
CGit reads the repository modification time from the following locations, in order from top to bottom: 1. agefile 2. repo.git/refs/heads/{default_branch | "master"} 3. repo.git/packed-refs (https://git.zx2c4.com/cgit/tree/ui-repolist.c?id=bd6f5683f6cde4212364354b3139c1d521f40f39#n35) Update the `/refs/heads/{default_branch}` file mtime when cloning and updating the repo to match the GitHub `updated_at` time. This ensures that when mirroring old repositories, they don't appear at the top of the CGit repository index list when sorting by age.
2021-05-30github::fetch_repos(): Fetch all repos from all pagesTeddy Wing
Also switch from `reqwest::blocking` to async because I was getting this error, probably because I call `fetch_repos()` in the async 'tokio' function `main()`: thread 'main' panicked at 'Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.', $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.6.1/src/runtime/blocking/shutdown.rs:51:21
2021-05-30Replace boxed errors with concrete error typesTeddy Wing
2021-05-30database: Use a custom `Error` typeTeddy Wing
Get rid of the boxed errors to make matching on errors easier.
2021-05-30database::repo_get: Don't need my own error for empty rowTeddy Wing
Sqlx already returns an appropriate error if no row was found.
2021-05-29Start setting up database interfaceTeddy Wing
2021-05-29Work out how to mirror a Git repositoryTeddy Wing
Based on the guide here: https://libgit2.org/docs/guides/101-samples/#repositories_clone_mirror References: https://github.com/libgit2/libgit2sharp/issues/577 https://github.com/libgit2/libgit2.github.io/pull/31
2021-05-29Parse GitHub API response to a structTeddy Wing
2021-05-29Make a test request to the GitHub API to get user reposTeddy Wing
2021-05-29New Rust v1.50.0 projectTeddy Wing