Running git restore after deleting a directory with nested subdirectories fails with fatal: cannot unlink '<dir>/<subdir>': directory not empty
I have provided a repro at #1900.
I speculate that git restore restores the parent directory first which recreates its entire projection, then tries to restore the subdirectory which fails because the subdirectory projection was already restored.