From 53a0abfaa284124284e3b3cf7b5e880f8d766ace Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 12 Nov 2024 03:04:55 -0500 Subject: [PATCH] Fixed bug where locally deleted files were not being deleted from yadm --- README.md | 4 ---- autoyadm.sh | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a55a8be..450fcd0 100644 --- a/README.md +++ b/README.md @@ -111,10 +111,6 @@ $ systemctl enable cronie $ systemctl start cronie ``` -## Known Issues - -- When tracked files are deleted, AutoYADM does not delete them from the repository, potentially resulting in conflicts if the repository is pulled/cloned to another machine. - ## Feature Roadmap - [ ] Allow custom `tracked` file location & name diff --git a/autoyadm.sh b/autoyadm.sh index 57179da..3b9a4ae 100755 --- a/autoyadm.sh +++ b/autoyadm.sh @@ -40,6 +40,12 @@ fi fi done) <"$AUTOYADMDIR/tracked" +# Now we also stage files already tracked by YADM +# that have been renamed or deleted; since the above +# loop will not stage them: + +yadm add -u + # Define the location of the ssh-agent environment sshenv="$HOME/.ssh/environment-$HOST" if [[ -n $(yadm status --porcelain) ]]; then