Skip to content

Commit 2687ffd

Browse files
committed
Merge branch 'jc/hold-diff-remove-q-synonym-for-no-deletion'
Remove a confusing and deprecated "-q" option from "git diff-files"; "git diff-files --diff-filter=d" can be used instead.
2 parents 289ca27 + c48f681 commit 2687ffd

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
@@ -91,9 +91,6 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
9191
unsigned ce_option = ((option & DIFF_RACY_IS_MODIFIED)
9292
? CE_MATCH_RACY_IS_DIRTY : 0);
9393

94-
if (option & DIFF_SILENT_ON_REMOVED)
95-
handle_deprecated_show_diff_q(&revs->diffopt);
96-
9794
diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/");
9895

9996
if (diff_unmerged_stage < 0)

diff-no-index.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,18 +186,13 @@ void diff_no_index(struct rev_info *revs,
186186
const char *prefix)
187187
{
188188
int i, prefixlen;
189-
unsigned deprecated_show_diff_q_option_used = 0;
190189
const char *paths[2];
191190

192191
diff_setup(&revs->diffopt);
193192
for (i = 1; i < argc - 2; ) {
194193
int j;
195194
if (!strcmp(argv[i], "--no-index"))
196195
i++;
197-
else if (!strcmp(argv[i], "-q")) {
198-
deprecated_show_diff_q_option_used = 1;
199-
i++;
200-
}
201196
else if (!strcmp(argv[i], "--"))
202197
i++;
203198
else {
@@ -230,9 +225,6 @@ void diff_no_index(struct rev_info *revs,
230225
revs->max_count = -2;
231226
diff_setup_done(&revs->diffopt);
232227

233-
if (deprecated_show_diff_q_option_used)
234-
handle_deprecated_show_diff_q(&revs->diffopt);
235-
236228
setup_diff_pager(&revs->diffopt);
237229
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
238230

diff.c

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

3602-
/* Used only by "diff-files" and "diff --no-index" */
3603-
void handle_deprecated_show_diff_q(struct diff_options *opt)
3604-
{
3605-
warning("'diff -q' and 'diff-files -q' are deprecated.");
3606-
warning("Use 'diff --diff-filter=d' instead to ignore deleted filepairs.");
3607-
parse_diff_filter_opt("d", opt);
3608-
}
3609-
36103602
static void enable_patch_output(int *fmt) {
36113603
*fmt &= ~DIFF_FORMAT_NO_OUTPUT;
36123604
*fmt |= DIFF_FORMAT_PATCH;

diff.h

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

346346
extern long parse_algorithm_value(const char *value);
347347

348-
extern void handle_deprecated_show_diff_q(struct diff_options *);
349-
350348
extern int print_stat_summary(FILE *fp, int files,
351349
int insertions, int deletions);
352350
extern void setup_diff_pager(struct diff_options *);

0 commit comments

Comments
 (0)