Skip to content

fix(sync): keep fork-deleted files deleted through the upstream merge - #230

Merged
catinspace-au merged 3 commits into
mainfrom
fix/sync-keep-fork-deleted
Nov 16, 2026
Merged

catinspace-au merged 3 commits into
mainfrom
fix/sync-keep-fork-deleted

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

The fork deliberately deletes 16 upstream workflows (.fork-deleted). Upstream edits one and the merge hits a modify/delete conflict. rerere can't record those.

The sync stops and files an issue for a person. #224 had 7 of its 28 conflicts like this.

  • upstream-sync.yml calls scripts/resolve-fork-deleted.py after git merge, before the "anything still conflicted" check
  • it git rms a path only if it is unmerged, listed in .fork-deleted (path or glob) and deleted on the fork
  • text conflicts, modify/delete on unlisted paths and files upstream deleted that the fork edited still stop the sync
  • tests build a conflicted merge and assert only the listed modify/delete is resolved
  • one paragraph added to docs/fork/sync-cycle.md

Done when the next sync no longer files an issue for a fork-deleted file.

A file deleted in the fork and listed in .fork-deleted conflicts whenever upstream edits it. rerere cannot record a modify/delete conflict. Each conflict stalled the weekly sync and triggered an issue for manual resolution. Issue 224 had 7 of its 28 conflicts of this kind.

scripts/resolve-fork-deleted.py runs straight after the merge in upstream-sync.yml. It runs git rm on each unmerged path listed in .fork-deleted and deleted in the fork. Text conflicts and modify/delete on unlisted paths still stop the sync. Files deleted upstream and edited in the fork still stop the sync.
The .fork-deleted entry in what-we-changed.md says a listed path stays deleted through the sync. The sync still stops only for a text conflict or an upstream delete of a file we edited. The knip note says an unlisted removal still conflicts until its path is listed.
@catinspace-au
catinspace-au merged commit 0213b1f into main Nov 16, 2026
34 checks passed
@catinspace-au
catinspace-au deleted the fix/sync-keep-fork-deleted branch November 16, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant