Skip to content

codeSplitters branches: delete a file on a branch (and carry upstream deletions and binary files into mirror branches) #440

Closed

Description

@QuinnsCode

Split out of #414 (the rest of it is fixed by the PR that closes #414).

codeSplitters branches (src/branches.ts) are Durable Object copies of the files they touch, and a copy can only be edited or new: there's no way to delete a file on a branch and have the merge delete it from main. So:

  • Opening an upstream branch on a mirror (POST /api/repos/:o/:r/mirror/branches), and a branch catching up with its upstream branch (pull, or each sync), list the files upstream deleted as skipped.
  • Binary files are skipped the same way, since a branch copy is lines of text.
  • Pushing a branch upstream can't delete a file either.

Needs: a "deleted" mark on branch_files (or a tombstone copy), the review and merge showing and applying it, and take/pushBranch in src/mirror.ts using it. Binary files would need a blob-backed copy, which might be its own issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions