aboutsummaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorTeddy Wing2021-05-30 23:34:06 +0200
committerTeddy Wing2021-05-30 23:34:06 +0200
commitc88dc471fae44101a7029341a1c7311e105f8a72 (patch)
treece37d91179a3770efe9df3d9c2ccb0afc6110b4b /Cargo.toml
parent94dc9d677ba0f25261f55b17f38b16a4b9d712af (diff)
downloadreflectub-c88dc471fae44101a7029341a1c7311e105f8a72.tar.bz2
Set repository mtime to GitHub `updated_at` time
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.
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml2
1 files changed, 2 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 854cc11..18ec2a4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,6 +5,8 @@ edition = "2018"
[dependencies]
anyhow = "1.0.40"
+chrono = "0.4.19"
+filetime = "0.2.14"
git2 = "0.13.20"
reqwest = { version = "0.11.3", features = ["json"] }
serde = { version = "1.0.126", features = ["derive"] }