Skip to content

Commit

Permalink
Merge pull request #1 from kaspar030/fix_initial_checkout_with_
Browse files Browse the repository at this point in the history
fix: don't forget checking out commit on first mirror
  • Loading branch information
kaspar030 authored Feb 6, 2024
2 parents 41b8d9e + a26126d commit 4272d59
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,14 +484,12 @@ fn main() -> Result<ExitCode> {
std::fs::create_dir_all(&cache_dir)
.with_context(|| format!("creating cache base directory {cache_dir}"))?;

let mut wanted_commit = None;
let wanted_commit = matches.get_one::<String>("commit");

let mut lock = cache_repo.lockfile()?;
{
let _lock = lock.write()?;
if !cache_repo.mirror()? {
wanted_commit = matches.get_one::<String>("commit");

let try_update =
wanted_commit.is_some_and(|commit| !cache_repo.has_commit(commit).unwrap());

Expand Down

0 comments on commit 4272d59

Please sign in to comment.