Skip to content

Commit

Permalink
commit: pay attention to submodule.$name.ignore in .gitmodules
Browse files Browse the repository at this point in the history
"git status" does not list a submodule with uncommitted working tree
files as modified when "submodule.$name.ignore" is set to "dirty" in
in-tree ".gitmodules" file.  Both status and commit honor the setting
in $GIT_DIR/config, but "commit" does not pick it up from .gitmodules,
which is inconsistent.

Teach "git commit" to pay attention to the setting in .gitmodules as
well.

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Orgad Shaneh authored and Junio C Hamano committed Sep 24, 2012
1 parent 87b5054 commit 8f6811e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
struct wt_status s;

wt_status_prepare(&s);
gitmodules_config();
git_config(git_commit_config, &s);
in_merge = file_exists(git_path("MERGE_HEAD"));
s.in_merge = in_merge;
Expand Down

0 comments on commit 8f6811e

Please sign in to comment.