diff options
| author | Teddy Wing | 2021-06-23 23:34:00 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2021-06-23 23:34:00 +0200 | 
| commit | 0e2faed4ac9b5950eb786a7127f9fc02df050c25 (patch) | |
| tree | ac03a1f2f974ea4fb94d22dac8465a913b693599 | |
| parent | b0287e272376fe788fffdd0fe7d5e799f3517d6e (diff) | |
| download | reflectub-0e2faed4ac9b5950eb786a7127f9fc02df050c25.tar.bz2 | |
update_mtime(): Remove `.or_else()` idea
Decided to keep the `match` expressions. Still working out how to clean
up the code in this function, though.
| -rw-r--r-- | src/main.rs | 40 | 
1 files changed, 0 insertions, 40 deletions
| diff --git a/src/main.rs b/src/main.rs index 6dae021..be06c28 100644 --- a/src/main.rs +++ b/src/main.rs @@ -326,46 +326,6 @@ fn update_mtime<P: AsRef<Path>>(          .join("refs/heads")          .join(&repo.default_branch); -    // filetime::set_file_times( -    //     &default_branch_ref, -    //     update_time, -    //     update_time, -    // ) -    //     .or_else(|e| { -    //         if (e.kind != io::ErrorKind::NotFound) { -    //             return Err(e); -    //         } -    // -    //         let packed_refs_path = repo_path -    //             .as_ref() -    //             .join("packed-refs"); -    // -    //         filetime::set_file_times( -    //             &packed_refs_path, -    //             update_time, -    //             update_time, -    //         ) -    //     }) -    //     .or_else(|e| { -    //         if (e.kind != io::ErrorKind::NotFound) { -    //             return Err(e); -    //         } -    // -    //         let packed_refs_path = repo_path -    //             .as_ref() -    //             .join("packed-refs"); -    // -    //         filetime::set_file_times( -    //             &packed_refs_path, -    //             update_time, -    //             update_time, -    //         ) -    //     }) -    //     .with_context(|| format!( -    //         "unable to set mtime on '{}'", -    //         &default_branch_ref.display(), -    //     ))?; -      // Try updating times on the default ref.      match filetime::set_file_times(          &default_branch_ref, | 
