Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes: > Junio C Hamano wrote: >> Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes: >> >>> Does git diff/ commit/ add/ rm or any other command you can think of >>> rely on a special file in the worktree (aka .gitmodules) to be checked >>> out? >> >> Try "git add foo~" with usual suspect in .gitignore ;-) > > First, it's not a hard requirement: in the worst case, git add will > add the file even without a -f. In the same sense .gitmodules is not a hard requirement, either. I use a submodule without .gitmodules in one of my repositories (the top-level houses the source to generete my dotfiles and is cloned to my environment at work, but the submodule houses my private files that live only at home). The gitlink entry in the index and the tree and presence of the .git repository in the submodule checkout (where it exists) is sufficient to make the layout work. If your complaints were "I cannot make X work with the current system, even with changes to git-submodule and some core part of the system, and I think the reason is because the way module information is stored is in a separate file .gitmodules", with a concrete X, people who are more versed with the submodule subsystem may be able to help you come up with a cleaner solution without throwing the baby with the bathwater, but I do not think we saw any concrete X mentioned. The same sentence followed by "... and with an object of a new type stored at the path of the submodule, I can make it work by doing A, B and C", with concrete A, B and C, some people may be interested in pursuing that avenue with you, but I do not think we saw such combinations of <X, A, B, C> either. If all of your argument starts from "I think .gitmodules is ugly because it is not an object of a separate type stored at the path of the submodule, and here are the reasons why I think it is ugly", I have nothing more to say to you. That "ugly" is at best skewed aesthetics, and each and every example that comes up in this discussion, like this "'git add' works with .gitignore", and the one I sent on ".gitattributes vs .gitmodules on the default" in the nearby subthread to Jonathan, makes me realize that .gitmodules is _more_ in line with the rest of the system, not less. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html