Hello.

As this is my first post to this list, let me first thank all the
people involved in Git development - it's really a great tool.

Now to the point. Since Git 1.8 (I think), git commit command honours
the submodules' ignore settings, configured either in .gitmodules, or
in .git/config. That's very nice and certainly correct for "git commit
-a", but it's less clear if one explicitely stages an updated
submodule using git add. Git commit will ignore it anyway, if
ignore=all is configured in .gitmodules. Maybe that's correct too, I'm
not sure about that, but it's inconvenient in our use case, especially
combined with the lack of --ignore-submodule parameter to git commit,
as git status and git diff have.

We use submodules in such a way that normally we don't ever want to
see changes in them in output of git diff and git status. So we set
ignore=all in .gitmodules for each submodule. But occasionally, we
need to add a new submodule, and sometimes also commit changed
submodule. This got harder with Git 1.8, we have to "git config
submodule.<name>.ignore none" before the commit, and "git config
--unset ..." after.

I'd like to at least add an --ignore-submodules parameter to git
commit. I though about posting a patch, but as I looked into the
commit source file, I didn't see any straightforward way to implement
it. I don't have enough free time for a deeper analysis of the
sources, I'm sorry.

So please, let me first know, whether you could possibly accept such
patch, and if so, then I'd really appreciate some hints on how to do
it.

And also, I'd like to know git folks' opinion on whether it's OK that
git commit with ignore=all in .gitmodules ignores submodules even when
they are explicitely staged with git add.

Thanks in advance for any reply,
Ronald Weiss
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to