As you mention, the patch git submodule: ignore dirty submodules for summary and statu is in the making.
Also announced in the Git 1.7.2-rc2 release:
Git v1.7.2 Release Notes (draft)
================================
Updates since v1.7.1
--------------------
"git status
" learned "--ignore-submodules
" option.
So unless you compile a very latest version, you won't have this option yet in the current stable releases.
Regarding this as an option is not exactly the approach chosen for now:
After this series I am planning to add a config option 'ignore
' to .gitmodules
, which can be set for each submodule to either "all", "dirty", "untracked" or "none" (the default).
"git diff
" and "git status
" will use that config value for each submodule.
Using "--ignore-submodule
" overrides this default (and the new parameter "none" will be added there to able to override the config settings).
And to avoid having to do "git submdule sync
" every time that option changes, I would like to search for it in .git/config
first.
If it is not found there, it will be taken from .gitmodules
, if present.
So users can override the setting but if they don't, upstream can change it easily (e.g. when a submodules .gitignore
has been updated so that "ignore=untracked
" is no longer necessary anymore it can be removed).
Also switching branches will have an effect instantly if the 'ignore
' entry in .gitmodules
is different between branches.