aboutsummaryrefslogtreecommitdiffstats
path: root/Cargo.lock
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.lock
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.lock')
-rw-r--r--Cargo.lock30
1 files changed, 28 insertions, 2 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 35e7af6..cdb8e4e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -128,6 +128,7 @@ dependencies = [
"libc",
"num-integer",
"num-traits",
+ "time",
"winapi",
]
@@ -227,6 +228,18 @@ dependencies = [
]
[[package]]
+name = "filetime"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "winapi",
+]
+
+[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1010,6 +1023,8 @@ name = "reflectub"
version = "0.0.1"
dependencies = [
"anyhow",
+ "chrono",
+ "filetime",
"git2",
"reqwest",
"serde",
@@ -1412,6 +1427,17 @@ dependencies = [
]
[[package]]
+name = "time"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
+dependencies = [
+ "libc",
+ "wasi",
+ "winapi",
+]
+
+[[package]]
name = "tinyvec"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1615,9 +1641,9 @@ dependencies = [
[[package]]
name = "wasi"
-version = "0.10.2+wasi-snapshot-preview1"
+version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
+checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "wasm-bindgen"