To discover the issue, I debugged such a call and found that since opt->ignore_skipworktree is not set, that the restore will not update the index when the file is not hydrated.
I verified that this works as expected, including that the file on-disk is projecting the new index version.
[X] This change only applies to the virtualization hook and VFS for Git.
As documented in microsoft/vfsforgit#1812, attempting to restore a file fails when using either of these commands in a VFS for Git repo:
To discover the issue, I debugged such a call and found that since
opt->ignore_skipworktree
is not set, that the restore will not update the index when the file is not hydrated.I verified that this works as expected, including that the file on-disk is projecting the new index version.