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

[PATCH v2 2/2] diff: finish removal of deprecated -q option

From
Anthony Sottile <asottile@umich.edu>
Date
Oct 13, 2017, 19:49 UTC
Message-ID
<20171013194916.4617-2-asottile@umich.edu>
In-Reply-To
<20171013194916.4617-1-asottile@umich.edu>
Functionality was removed in c48f6816f0 but the cli option was not removed.
Signed-off-by: Anthony Sottile <asottile@umich.edu>
---
 builtin/diff-files.c | 2 --
 builtin/diff.c       | 2 --
 diff.h               | 4 +---
 3 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index e88493f..b0ff251 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -37,8 +37,6 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
 			rev.max_count = 2;
 		else if (!strcmp(argv[1], "--theirs"))
 			rev.max_count = 3;
-		else if (!strcmp(argv[1], "-q"))
-			options |= DIFF_SILENT_ON_REMOVED;
 		else
 			usage(diff_files_usage);
 		argv++; argc--;
diff --git a/builtin/diff.c b/builtin/diff.c
index f5bbd4d..96513e8 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -227,8 +227,6 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
 			revs->max_count = 2;
 		else if (!strcmp(argv[1], "--theirs"))
 			revs->max_count = 3;
-		else if (!strcmp(argv[1], "-q"))
-			options |= DIFF_SILENT_ON_REMOVED;
 		else if (!strcmp(argv[1], "-h"))
 			usage(builtin_diff_usage);
 		else
diff --git a/diff.h b/diff.h
index aca150b..c9d71e1 100644
--- a/diff.h
+++ b/diff.h
@@ -65,7 +65,7 @@ typedef struct strbuf *(*diff_prefix_fn_t)(struct diff_options *opt, void *data)
 #define DIFF_OPT_BINARY              (1 <<  2)
 #define DIFF_OPT_TEXT                (1 <<  3)
 #define DIFF_OPT_FULL_INDEX          (1 <<  4)
-#define DIFF_OPT_SILENT_ON_REMOVE    (1 <<  5)
+/* (1 << 5) unused */
 #define DIFF_OPT_FIND_COPIES_HARDER  (1 <<  6)
 #define DIFF_OPT_FOLLOW_RENAMES      (1 <<  7)
 #define DIFF_OPT_RENAME_EMPTY        (1 <<  8)
@@ -374,8 +374,6 @@ extern void diff_warn_rename_limit(const char *varname, int needed, int degraded
  */
 extern const char *diff_aligned_abbrev(const struct object_id *sha1, int);
 
-/* do not report anything on removed paths */
-#define DIFF_SILENT_ON_REMOVED 01
 /* report racily-clean paths as modified */
 #define DIFF_RACY_IS_MODIFIED 02
 extern int run_diff_files(struct rev_info *revs, unsigned int option);
-- 
2.7.4
Previous: Anthony Sottile
Message 2 of 2 in “diff: alias -q to --quiet”
  1. 1/2 diff: alias -q to --quietAnthony Sottile, Oct 13, 2017
  2. 2/2 diff: finish removal of deprecated -q optionAnthony Sottile, Oct 13, 2017

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.