Files
hermes-agent/tests
Teknium 3fc54fbe23 fix: a killed move that only changed an entry's type is restored, not marked done
A regular file holding `original` and a symlink to `original` are one Git blob
id, so the interrupted-pull classifier's equal-blob branch (which compared only
the executable bit, and skipped current links) never attributed a file<->symlink
change to the killed git. Recovery returned False, deleted its marker, and left a
staged `T` entry with HEAD still on `pre` (review N07 residual).

The equal-blob branch now asks `_modes_git_wrote`: the target keeps the pre blob
under another mode and the entry already has that mode. The worktree shows it
via lstat (a link) and the executable bit (not on Windows); under
core.symlinks=false a link is checked out as the very same plain file, so the
index's staged mode is read too (git writes it after the tree). Only paths whose
target has a same-blob mode change pay the one config + ls-files call.

Test: test_an_equal_blob_type_change_git_wrote_is_restored, both directions x
{tree written, tree+index written, core.symlinks=false}; 6/6 fail on base.
2026-10-06 06:22:28 -07:00
..