Skip to content

Sparse: case-insensitive filesystems can alias an old-view path with a newly in-view one in the untracked-file guard #241

Closed

Description

@tonibergholm-codento

Found while reviewing #236.

refuse_untracked_for_view_change now checks only paths the old view did not match. On a case-insensitive filesystem, is_tracked_case_alias (crates/repo/src/repo.rs) can count an old-view tracked path such as docs/a.txt as the same file as a newly in-view Docs/a.txt, so a user-owned file at the newly in-view path may be treated as tracked and the guard does not refuse. Same aliasing question exists for the stopped-op widen (widen_while_stopped) that reuses the guard.

Not fixed in #236. Needs a case-folding filesystem test (macOS) and a decision on whether the alias exemption should apply only when the aliased path is in the old view's laid-out set for the same inode.

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