diff options
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index c5ab683d5b..0181750926 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -67,7 +67,7 @@ static char *author_name, *author_email, *author_date; static int all, edit_flag, also, interactive, only, amend, signoff; static int quiet, verbose, no_verify, allow_empty, dry_run, renew_authorship; static int no_post_rewrite; -static char *untracked_files_arg, *force_date; +static char *untracked_files_arg, *force_date, *ignore_submodule_arg; /* * The default commit message cleanup mode will remove the lines * beginning with # (shell comments) and leading and trailing @@ -1031,6 +1031,9 @@ int cmd_status(int argc, const char **argv, const char *prefix) "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, + { OPTION_STRING, 0, "ignore-submodules", &ignore_submodule_arg, "when", + "ignore changes to submodules, optional when: all, dirty, untracked. (Default: all)", + PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, OPT_END(), }; @@ -1052,6 +1055,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL); s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0; s.in_merge = in_merge; + s.ignore_submodule_arg = ignore_submodule_arg; wt_status_collect(&s); if (s.relative_paths) @@ -1070,6 +1074,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) break; case STATUS_FORMAT_LONG: s.verbose = verbose; + s.ignore_submodule_arg = ignore_submodule_arg; wt_status_print(&s); break; } |