git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] status: -i shorthand for --ignored command line option

From
Nicholas Guriev <guriev-ns@ya.ru>
Date
Aug 9, 2018, 06:21 UTC
Message-ID
<20180809062142.15638-1-guriev-ns@ya.ru>
In-Reply-To
<CAPig+cTD7XYbaPBzj36Eudrud80r-cz1CPLDsLA9CHJC6Yc-Qw@mail.gmail.com>

It allows for uniformity with the --untracked-files option. Also the new short flag saves the number of keys to press for the typically git-status command.

Signed-off-by: Nicholas Guriev <guriev-ns@ya.ru>
---
 Documentation/git-status.txt | 1 +
 builtin/commit.c             | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index d9f422d..cce352a 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -97,6 +97,7 @@ configuration variable documented in linkgit:git-config[1].
 	(and suppresses the output of submodule summaries when the config option
 	`status.submoduleSummary` is set).
 
+-i[<mode>]::
 --ignored[=<mode>]::
 	Show ignored files as well.
 +
diff --git a/builtin/commit.c b/builtin/commit.c
index 158e3f8..44829b9 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1319,7 +1319,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
 		  N_("mode"),
 		  N_("show untracked files, optional modes: all, normal, no. (Default: all)"),
 		  PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
-		{ OPTION_STRING, 0, "ignored", &ignored_arg,
+		{ OPTION_STRING, 'i', "ignored", &ignored_arg,
 		  N_("mode"),
 		  N_("show ignored files, optional modes: traditional, matching, no. (Default: traditional)"),
 		  PARSE_OPT_OPTARG, NULL, (intptr_t)"traditional" },
-- 
2.7.4
Previous: Eric SunshineNext: Junio C Hamano
Message 3 of 6 in “status: -i shorthand for --ignored command line option”
  1. status: -i shorthand for --ignored command line optionNicholas Guriev, Aug 8, 2018
  2. Eric SunshineAug 8, 2018
  3. status: -i shorthand for --ignored command line optionNicholas Guriev, Aug 9, 2018
  4. Junio C HamanoAug 9, 2018
  5. status: -i shorthand for --ignored command line optionКоля Гурьев, Aug 13, 2018
  6. Junio C HamanoAug 13, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.