mirror of
https://github.com/firstsun-dev/git-files-sync.git
synced 2026-07-22 06:54:27 +00:00
detectRename only checked whether a tracked old path's file was missing from the vault, with no content verification. Any orphaned syncMetadata entry (e.g. left behind by a local delete, which never cleared it) would cause the next unrelated push to be misclassified as a rename from that stale path, using create-only semantics that 422'd if the target path already existed remotely. - detectRename now confirms identity by checking that the remote content at the candidate old path still matches what's being pushed. - handleRename looks up the existing remote file at the new path and sends its sha, so pushing onto an existing remote path updates instead of failing with "file already exists". - Local deletes (single and batch) now clear syncMetadata for the deleted path so it can't become an orphaned rename source later. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| gitignore-manager.test.ts | ||
| sync-manager-batch.test.ts | ||
| sync-manager-binary.test.ts | ||
| sync-manager-hidden.test.ts | ||
| sync-manager-mapping.test.ts | ||
| sync-manager-test-helpers.ts | ||
| sync-manager.test.ts | ||