Closes a coverage gap where git checkout path restores were allowed at every protection level unless the command used a -- separator.
Fixed
- Fixed separator-free
git checkoutpath restores being allowed. Commands such asgit checkout .,git checkout src/,git checkout src/app.ts, and glob operands such asgit checkout '*.ts'are now blocked by thegit.checkout-double-dashrule, which points togit stashorgit switch. (#128)
Changed
- Changed a lone
git checkoutoperand to count as a path restore when it is spelled as a path (.,..,./…,../…,:magic pathspecs, absolute or drive-letter forms, or a trailing slash) or when it names an existing entry in the working tree. Bare branch names such asgit checkout main, along with the-b,-t,--track, and--detachforms, stay allowed. A branch whose name matches an existing file or directory is now blocked instead, with guidance to usegit switch. (#128)