Skip to content

Commit 8f6811e

Browse files
orgadsgitster
authored andcommitted
commit: pay attention to submodule.$name.ignore in .gitmodules
"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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 87b5054 commit 8f6811e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/commit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
12561256
struct wt_status s;
12571257

12581258
wt_status_prepare(&s);
1259+
gitmodules_config();
12591260
git_config(git_commit_config, &s);
12601261
in_merge = file_exists(git_path("MERGE_HEAD"));
12611262
s.in_merge = in_merge;

0 commit comments

Comments
 (0)