Skip to content

merge/pick/rebase --abort deletes an untracked user file at an in-view path that theirs holds and the tip does not (public and private abort) #255

Closed

Description

@tonibergholm-codento

Noted while fixing #246 (PR #252). Abort removes every in-view path that theirs holds and the restored tip does not. If the user has an untracked (or ignored) file at such a path, abort deletes it. The public abort already behaves this way; the private abort (new in #252) copies it. A stopped merge refuses to lay a file over an untracked one (refuse_untracked_overwrite), so in practice the collision arises only from files the user created after the stop. Fix: abort should delete only what the stop recorded as laid (CONFLICT_PLAINTEXT, CONFLICT_SIDECARS, and tracked-in-theirs paths whose on-disk bytes still equal what the stop wrote), and leave anything else. Also report (not ignore) a failed unlink of decrypted files on the private abort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions