Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sparse-checkout: reject arguments in cone-mode that look like patterns
In sparse-checkout add/set under cone mode, the arguments passed are supposed to be directories rather than gitignore-style patterns. However, given the amount of effort spent in the manual discussing patterns, it is easy for users to assume they need to pass patterns such as /foo/* or !/bar/*/ or perhaps they really do ignore the directory rule and specify a random gitignore-style pattern like *.c To help catch such mistakes, throw an error if any of the positional arguments: * starts with any of '/!' * contains any of '*\?[]' Inform users they can pass --skip-checks if they have a directory that really does have such special characters in its name. Signed-off-by: Elijah Newren <newren@gmail.com>
- Loading branch information