Forbid git rm --cached of submodule
- Dominant language
- JavaScript
- Stars
- 233
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
In git.git, rm --cached of a submodule does a sort of terrible thing where it removes the index entry for the submodule, but doesn't touch .gitmodules. This leaves a state where no git command will remove the entry from .gitmodules.
In current git-meta, rm --cached of a submodules stages a change to .gitmodules as well. But a .gitmodules file with staged changes not reflected on disk is not a situation that git handles well.
We should fix this by treating rm --cached as an error in git-meta. The message could be something like, "You can't do git meta rm --cached on a submodule. While in theory there are ways to represent your requested state, git and nodegit don't handle them very well, so we have forbidden it."
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.