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

[PATCH 2/3] clean: rename `ignored` -> `remove_ignored`

From
Ivan Shapovalov <intelfx@intelfx.name>
Date
Feb 10, 2025, 19:14 UTC
Message-ID
<20250210191504.309661-3-intelfx@intelfx.name>
In-Reply-To
<20250210191504.309661-1-intelfx@intelfx.name>
No behavior change.
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
---
 builtin/clean.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/clean.c b/builtin/clean.c
index eaddf6a06e..ec58338049 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -923,7 +923,7 @@ int cmd_clean(int argc,
 	      struct repository *repo UNUSED)
 {
 	int i, res;
-	int dry_run = 0, remove_directories = 0, quiet = 0, ignored = 0;
+	int dry_run = 0, remove_directories = 0, quiet = 0, remove_ignored = 0;
 	int ignored_only = 0, force = 0, errors = 0, gone = 1;
 	int rm_flags = REMOVE_DIR_KEEP_NESTED_GIT;
 	struct strbuf abs_path = STRBUF_INIT;
@@ -942,7 +942,7 @@ int cmd_clean(int argc,
 				N_("remove whole directories")),
 		OPT_CALLBACK_F('e', "exclude", &exclude_list, N_("pattern"),
 		  N_("add <pattern> to ignore rules"), PARSE_OPT_NONEG, exclude_cb),
-		OPT_BOOL('x', NULL, &ignored, N_("remove ignored files, too")),
+		OPT_BOOL('x', NULL, &remove_ignored, N_("remove ignored files, too")),
 		OPT_BOOL('X', NULL, &ignored_only,
 				N_("remove only ignored files")),
 		OPT_END()
@@ -963,9 +963,9 @@ int cmd_clean(int argc,
 
 	dir.flags |= DIR_SHOW_OTHER_DIRECTORIES;
 
-	if (ignored && ignored_only)
+	if (remove_ignored && ignored_only)
 		die(_("options '%s' and '%s' cannot be used together"), "-x", "-X");
-	if (!ignored)
+	if (!remove_ignored)
 		setup_standard_excludes(&dir);
 	if (ignored_only)
 		dir.flags |= DIR_SHOW_IGNORED;
@@ -995,7 +995,7 @@ int cmd_clean(int argc,
 		 * recursing into a directory which is itself ignored.
 		 */
 		dir.flags |= DIR_SHOW_IGNORED_TOO;
-		if (!ignored)
+		if (!remove_ignored)
 			dir.flags |= DIR_SHOW_IGNORED_TOO_MODE_MATCHING;
 
 		/*
-- 
2.48.1.5.g9188e14f140
Previous: Ivan ShapovalovNext: Ivan Shapovalov
Message 3 of 9 in “clean: add `config.exclude` and `--remove-excluded`”
  1. 0/3 clean: add `config.exclude` and `--remove-excluded`Ivan Shapovalov, Feb 10, 2025
  2. 1/3 clean, dir: add and use new helper `add_patterns_from_string_list()`Ivan Shapovalov, Feb 10, 2025
  3. 2/3 clean: rename `ignored` -> `remove_ignored`Ivan Shapovalov, Feb 10, 2025
  4. 3/3 clean: add `config.exclude` and `--remove-excluded`Ivan Shapovalov, Feb 10, 2025
  5. Junio C HamanoFeb 11, 2025
  6. Junio C HamanoFeb 11, 2025
  7. Ivan ShapovalovFeb 11, 2025
  8. Junio C HamanoFeb 11, 2025
  9. Ivan ShapovalovFeb 11, 2025

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.