diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-30 11:55:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-30 11:55:39 -0700 |
commit | a76b2084fb9c7e788108717fdce4c91227808980 (patch) | |
tree | 7fa7cd5019490a51bea649141c795786b9c85017 /builtin | |
parent | 978327f97dd3bd20f1648a2fcac601191976b18c (diff) | |
parent | 46a958b3daa1da336683ec82d7f321d0f51b39c8 (diff) | |
download | git-a76b2084fb9c7e788108717fdce4c91227808980.tar.gz |
Merge branch 'jl/status-ignore-submodules'
* jl/status-ignore-submodules:
Add the option "--ignore-submodules" to "git status"
git submodule: ignore dirty submodules for summary and status
Conflicts:
builtin/commit.c
t/t7508-status.sh
wt-status.c
wt-status.h
Diffstat (limited to 'builtin')
-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 c6b053a508..c101f006f6 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -72,7 +72,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, allow_empty_message; -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 @@ -1059,6 +1059,9 @@ int cmd_status(int argc, const char **argv, const char *prefix) PARSE_OPT_OPTARG, NULL, (intptr_t)"all" }, OPT_BOOLEAN(0, "ignored", &show_ignored_in_status, "show ignored files"), + { 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(), }; @@ -1089,6 +1092,7 @@ int cmd_status(int argc, const char **argv, const char *prefix) 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) @@ -1107,6 +1111,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; } |