fix(store-init): re-sync after running auto store init (#1834)

This commit is contained in:
Ellie Huxtable 2024-03-06 15:16:07 +00:00 committed by GitHub
parent da24f734e5
commit f943e03f90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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?;