Skip to content

adopt-project.py on a disk that ignores case: a symlink twin sent to a leg beside a folder the root keeps leaves a folder under its name, and the mount's git rm -f stops with 'Is a directory' after both legs are pushed #1250

Open

Description

@brettheap

Found by w1237f, writing #1237's fix round for #1183, on r1237's case-folding bench (fuse/bench.py, a disk that ignores case).

Measured with git 2.43 at 58aa9d2b (#1189's head), c9f0cc18 and 63c52718 (#1237's heads), with the same result each time:

  • The source holds a symlink D and a folder d/. On a disk that ignores case they are a set of case twins, so check names them.
  • The plan sends D to a leg and keeps d/ in the root.
  • After the clone, D on the disk is the folder d/, because the clone writes d/ last.
  • execute's mount runs git rm -f -- D, which stops with fatal: git rm: 'D': Is a directory. execute exits 2 after both legs are pushed.
  • Nothing is deleted: the folder and every file in it stay.

Why it is not #1237's: #1237's fix (r1237's MUST 1) handles a path beyond a symlink, where -f could delete through it. Here the removed path is the symlink itself, and on the disk it is a folder. git refuses the folder, so nothing is lost, but execute stops late.

  • Remove a symlink twin from the index only (git rm --cached) where the disk holds a folder under its name, or let check refuse the plan before any leg.
  • Add a row on the bench disk: D a symlink sent to a leg, d/ a folder kept. It gives no late stop, or a refusal in check.

Lane: openreposhape-1 (openRepoShape-1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions