diff --git a/README.md b/README.md index 07784f1..6f31ccc 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,13 @@ When devices edit the same file while disconnected, Appa keeps both versions. Use `appa folder conflicts ` to find the additional copies, then choose the content you want. -Appa keeps 100 local revisions by default. Set `APPA_HISTORY_REVISIONS` to a +Appa keeps 10 local revisions by default. Set `APPA_HISTORY_REVISIONS` to a positive value to change that limit. +Older Appa releases may have left persistent blob tags behind. Use +`appa doctor --drop-legacy-tags` to remove them; periodic garbage collection +will later reclaim blobs that are no longer referenced by Appa state. + ## Identity and diagnostics Each installation has a device identity. Back it up outside synchronized diff --git a/src/storage.rs b/src/storage.rs index 95c0ed4..10fe13f 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -47,7 +47,7 @@ pub use manifests::ManifestRevision; pub use paths::AppPaths; pub use peers::PeerInfo; -const DEFAULT_HISTORY_REVISIONS: usize = 100; +const DEFAULT_HISTORY_REVISIONS: usize = 10; pub struct StateStore { connection: Connection, diff --git a/src/storage/tests.rs b/src/storage/tests.rs index 16b8b1b..90b85d4 100644 --- a/src/storage/tests.rs +++ b/src/storage/tests.rs @@ -4,7 +4,8 @@ use tempfile::TempDir; use time::{OffsetDateTime, format_description::well_known::Rfc3339}; use super::{ - AppPaths, FileFingerprint, StateStore, prune_manifest_history, validate_history_revision_limit, + AppPaths, DEFAULT_HISTORY_REVISIONS, FileFingerprint, StateStore, prune_manifest_history, + validate_history_revision_limit, }; #[test] @@ -365,3 +366,8 @@ fn prunes_manifest_history_to_its_configured_limit() -> anyhow::Result<()> { fn rejects_a_zero_history_revision_limit() { assert!(validate_history_revision_limit(0).is_err()); } + +#[test] +fn keeps_ten_revisions_by_default() { + assert_eq!(DEFAULT_HISTORY_REVISIONS, 10); +}