Skip to content

Commit

Permalink
fix(store-init): re-sync after running auto store init (#1834)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellie authored Mar 6, 2024
1 parent da24f73 commit f943e03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions atuin/src/command/client/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,17 @@ async fn run(
println!("Running automatic history store init...");

// Internally we use the global filter mode, so this context is ignored.
// don't recurse or loop here.
history_store.init_store(db).await?;

println!("Re-running sync due to new records locally");

// we'll want to run sync once more, as there will now be stuff to upload
let (uploaded, downloaded) = sync::sync(settings, &store).await?;

history_store.incremental_build(db, &downloaded).await?;

println!("{uploaded}/{} up/down to record store", downloaded.len());
}
} else {
atuin_client::sync::sync(settings, force, db).await?;
Expand Down

0 comments on commit f943e03

Please sign in to comment.