summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-04-10 07:33:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-04-10 07:43:59 (GMT)
commit2381e39e5ff740883b98c5aca019950f9167b67f (patch)
tree156a09a3f719d1a1d9bfa4f8a65e6e3d93c13065 /builtin
parent1b908b6fb48f4f8009804c097b14106df548247c (diff)
downloadgit-2381e39e5ff740883b98c5aca019950f9167b67f.zip
git-2381e39e5ff740883b98c5aca019950f9167b67f.tar.gz
git-2381e39e5ff740883b98c5aca019950f9167b67f.tar.bz2
status: --ignored option shows ignored files
There is no stronger reason behind the choice of "!!" than just I happened to have typed them. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index c5ab683..761ca07 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -83,6 +83,7 @@ static enum {
static char *cleanup_arg;
static int use_editor = 1, initial_commit, in_merge, include_status = 1;
+static int show_ignored_in_status;
static const char *only_include_assumed;
static struct strbuf message;
@@ -1031,6 +1032,8 @@ 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" },
+ OPT_BOOLEAN(0, "ignored", &show_ignored_in_status,
+ "show ignored files"),
OPT_END(),
};
@@ -1044,7 +1047,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)
builtin_status_options,
builtin_status_usage, 0);
handle_untracked_files_arg(&s);
-
+ if (show_ignored_in_status)
+ s.show_ignored_files = 1;
if (*argv)
s.pathspec = get_pathspec(prefix, argv);