Skip to content

Commit c48f681

Browse files
committed
diff: remove "diff-files -q" in a version of Git in a distant future
This was inherited from "show-diff -q" that was invented to tell comparison between the index and the working tree to ignore only removals in 2005. These days, it is spelled as "--diff-filter=d". Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 95a7c54 commit c48f681

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

diff-lib.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
8989
unsigned ce_option = ((option & DIFF_RACY_IS_MODIFIED)
9090
? CE_MATCH_RACY_IS_DIRTY : 0);
9191

92-
if (option & DIFF_SILENT_ON_REMOVED)
93-
handle_deprecated_show_diff_q(&revs->diffopt);
94-
9592
diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/");
9693

9794
if (diff_unmerged_stage < 0)

diff-no-index.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ void diff_no_index(struct rev_info *revs,
187187
{
188188
int i, prefixlen;
189189
int no_index = 0;
190-
unsigned deprecated_show_diff_q_option_used = 0;
191190
const char *paths[2];
192191

193192
/* Were we asked to do --no-index explicitly? */
@@ -224,10 +223,6 @@ void diff_no_index(struct rev_info *revs,
224223
int j;
225224
if (!strcmp(argv[i], "--no-index"))
226225
i++;
227-
else if (!strcmp(argv[i], "-q")) {
228-
deprecated_show_diff_q_option_used = 1;
229-
i++;
230-
}
231226
else if (!strcmp(argv[i], "--"))
232227
i++;
233228
else {
@@ -260,9 +255,6 @@ void diff_no_index(struct rev_info *revs,
260255
revs->max_count = -2;
261256
diff_setup_done(&revs->diffopt);
262257

263-
if (deprecated_show_diff_q_option_used)
264-
handle_deprecated_show_diff_q(&revs->diffopt);
265-
266258
setup_diff_pager(&revs->diffopt);
267259
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
268260

diff.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,14 +3570,6 @@ static int parse_diff_filter_opt(const char *optarg, struct diff_options *opt)
35703570
return 0;
35713571
}
35723572

3573-
/* Used only by "diff-files" and "diff --no-index" */
3574-
void handle_deprecated_show_diff_q(struct diff_options *opt)
3575-
{
3576-
warning("'diff -q' and 'diff-files -q' are deprecated.");
3577-
warning("Use 'diff --diff-filter=d' instead to ignore deleted filepairs.");
3578-
parse_diff_filter_opt("d", opt);
3579-
}
3580-
35813573
int diff_opt_parse(struct diff_options *options, const char **av, int ac)
35823574
{
35833575
const char *arg = av[0];

diff.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,6 @@ extern int parse_rename_score(const char **cp_p);
341341

342342
extern long parse_algorithm_value(const char *value);
343343

344-
extern void handle_deprecated_show_diff_q(struct diff_options *);
345-
346344
extern int print_stat_summary(FILE *fp, int files,
347345
int insertions, int deletions);
348346
extern void setup_diff_pager(struct diff_options *);

0 commit comments

Comments
 (0)