Skip to content

v1.5.1 — Fix duplicate files on pull

Choose a tag to compare

@RoBYCoNTe RoBYCoNTe released this 18 Mar 21:31
· 38 commits to main since this release

Bug Fix

Preserve original local filenames on pull for CRs and Bugs

Problem: When pushing local Change Requests and Bugs to remote and then pulling them back, the CLI would create new files using the remote record ID as filename (e.g. CR-a1b2c3d4.md, BUG-e5f6g7h8.md) instead of preserving the original local path. This caused duplicates of all CRs and Bugs on every pull.

Root cause: pullCRsFromRemote and pullBugsFromRemote hardcoded filenames as CR-{id}.md / BUG-{id}.md, ignoring the mapping stored in remote-state.json during push.

Fix: Pull now builds a reverse mapping (remoteId → localPath) from remote-state.json and writes files back to their original path. Only genuinely new CRs/Bugs (created on remote, never pushed from this client) get an ID-based fallback filename.

The state is also updated after each pull so future pulls remain consistent.

Full Changelog: v1.5.0...v1.5.1