github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.15k stars 4.21k forks source link

Manually remove module in `.git` when replacing grammars #6990

Closed lildude closed 1 month ago

lildude commented 1 month ago

Description

As discovered in https://github.com/github-linguist/linguist/pull/6985#issuecomment-2284478929, for some reason the .git/modules/vendor/grammars/:grammar-name isn't always removed when replacing a grammar when running script/add-grammar --replace :grammar-name. This PR adds a manual removal of the submodule in .git/modules/vendor/grammars/:grammar-name to ensure that the submodule is removed when replacing grammars.

Checklist: