Skip to content

Commit b911b43

Browse files
committed
feat: improve cache of copy targets
For templates and symlinks, it is easy to see if the target has changed (e.g., symlink is destroyed, or the rendered template differs to the target). This is not as easy to do with copy target; if the source and target differ, it is unclear whether the source was modified and the target is stale, or the target was modified outside of dotter (or both). This changes the caching so that it stores a hash (using `xxhash`) of both source and target. On redeployment, the hashes can be compared and dotter can determine whether it is safe to override the target file. Assisted-by: Claude Code:claude-sonnet-4-6 Signed-off-by: JP-Ellis <josh@jpellis.me>
1 parent b28bfeb commit b911b43

6 files changed

Lines changed: 811 additions & 251 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ hostname = "0.3.*"
2222
log = "0.4.*"
2323
maplit = "1.*"
2424
evalexpr = "13"
25+
xxhash-rust = { version = "0.8", features = ["xxh3"] }
2526
serde = { version = "1.*", features = ["derive"] }
2627
shellexpand = "2.*"
2728
simplelog = "0.12.*"

0 commit comments

Comments
 (0)