git-meta icon indicating copy to clipboard operation
git-meta copied to clipboard

Forbid git rm --cached of submodule

Open novalis opened this issue 7 years ago • 0 comments

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."

novalis avatar May 10 '18 14:05 novalis