When applying format changes to staged files, git-clang-format erroneously checks out all files in the index and thus may overwrite unstaged changes. Fixes #65643.