5 ms·
Do you have an example of this mismatch you could share?
by ta8645 6y ago
Do you have an example of this mismatch you could share?
- pornel 6y agoUsers assume submodules would behave sensibly, and they don't. State of submodules is part of a commit, so you'd expect that checking out a commit checks out the submodules. It doesn't. Or if you notice git doesn't care about the content of submodules in the working tree, you'll be surprised when rebasing (change of a dir to/from submodule breaks rebase). Merging has "ours"/"theirs" startegies, except it doesn't for submodules (there's suddenly local/remote distinction, and breaks -Xtheirs in rebase). From the diffs it looks like submodules are defined in .gitmodules and the tree, so removing them from these places would delete them. It doesn't (it fucks up internal state of .git dir). And you'd think .git dir is a dir, except when it isn't. It's like whoever designed submodules just loves saying "gotcha!" and telling frustrated users they suck at git. Everything submodules do is subtly different with sharp edges.