Orgad Shaneh <org...@gmail.com> writes:
> As reported on the mailing list, ignore submodule config is not
> respected on commit.
> Signed-off-by: Orgad Shaneh <org...@gmail.com>
Please do not force people to go to external website like that while
reading the "git log" output. You could have just said
"git status" does not list a submodule with uncommitted
working tree files as modified when "submodule.$name.ignore"
configuration is set to "dirty", but "git commit" forgets
to take this configuration variable into account.
or something. It would also be good to say "I reported it earlier
in this message" with the URL _after_ the three-dash line.
I see Jens added with 302ad7a (Submodules: Use "ignore" settings
from .gitmodules too for diff and status, 2010-08-06) the call to
gitmodules_config() to "git status" and "git diff" family, but I
suspect that was a huge mistake. Once a submodule is initialized
with "submodule init", the default set of configuration should be
copied to the user's $GIT_DIR/config and subsequent run-time
invocation should read $GIT_DIR/config and $GIT_DIR/config alone, to
honor user's customization.
Instead, I think git_commit_config() and git_status_config() should
call submodule_config() function to read submodule.$name.ignore not
from .gitmodules file but from $GIT_DIR/config.
Jens, what do you think? I see no reason for anybody other than
"submodule init" to call gitmodules_config() that reads from the
in-tree .gitmodules file.
> builtin/commit.c | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/builtin/commit.c b/builtin/commit.c
> index 62028e7..7a83cae 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1452,6 +1452,7 @@ int cmd_commit(int argc, const char **argv, const char
> + gitmodules_config();
> git_config(git_commit_config, &s);
> s.colopts = 0;
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