Commit 69fc3e3
feat: ignore backup files in .gitignore by default
This change ensures that backup files created by AgentSync (e.g., when
replacing an existing file with a symlink or during skill updates) are
automatically ignored by Git.
Changes:
- In `src/config.rs`, `all_gitignore_entries()` now includes:
- `{destination}.bak.*` for every target destination.
- `.agents/skills/*.bak` as a defensive pattern to ignore skill backup files.
- Added explanatory comment for the defensive skill backup pattern.
- Updated `test_all_gitignore_entries_skips_disabled_agents` to verify that
backup patterns are also excluded for disabled agents.
- Added a unit test `test_all_gitignore_entries_includes_backup_patterns` to
verify the new behavior for enabled agents.
- Fixed code style by adding a blank line before the new test.
- Verified that all 191 tests pass.
Co-authored-by: yacosta738 <33158051+yacosta738@users.noreply.github.com>1 parent a9a74d5 commit 69fc3e3
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
| 282 | + | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| 678 | + | |
678 | 679 | | |
| 680 | + | |
679 | 681 | | |
680 | 682 | | |
681 | 683 | | |
| |||
1264 | 1266 | | |
1265 | 1267 | | |
1266 | 1268 | | |
| 1269 | + | |
1267 | 1270 | | |
1268 | 1271 | | |
1269 | 1272 | | |
| |||
0 commit comments