aboutsummaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-09-09 14:28:35 -0700
committerJunio C Hamano <gitster@pobox.com>2013-09-09 14:28:35 -0700
commit01a2a03c56e8d4cd9724b185a48a2a1ea9852f0c (patch)
tree85753a9502a729d3be359996a9e98b8532515e8e /diff-lib.c
parenta5e10f8bc1db418fc806abb7574bb1e468948d19 (diff)
parent95a7c546b02a962b9e458f7fd2d0ed9b657c0ca6 (diff)
downloadgit-01a2a03c56e8d4cd9724b185a48a2a1ea9852f0c.tar.gz
git-01a2a03c56e8d4cd9724b185a48a2a1ea9852f0c.tar.xz
Merge branch 'jc/diff-filter-negation'
Teach "git diff --diff-filter" to express "I do not want to see these classes of changes" more directly by listing only the unwanted ones in lowercase (e.g. "--diff-filter=d" will show everything but deletion) and deprecate "diff-files -q" which did the same thing as "--diff-filter=d". * jc/diff-filter-negation: diff: deprecate -q option to diff-files diff: allow lowercase letter to specify what change class to exclude diff: reject unknown change class given to --diff-filter diff: preparse --diff-filter string argument diff: factor out match_filter() diff: pass the whole diff_options to diffcore_apply_filter()
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/diff-lib.c b/diff-lib.c
index b6f4b2163..f1a905316 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -87,10 +87,12 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
{
int entries, i;
int diff_unmerged_stage = revs->max_count;
- int silent_on_removed = option & DIFF_SILENT_ON_REMOVED;
unsigned ce_option = ((option & DIFF_RACY_IS_MODIFIED)
? CE_MATCH_RACY_IS_DIRTY : 0);
+ if (option & DIFF_SILENT_ON_REMOVED)
+ handle_deprecated_show_diff_q(&revs->diffopt);
+
diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/");
if (diff_unmerged_stage < 0)
@@ -137,8 +139,6 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
perror(ce->name);
continue;
}
- if (silent_on_removed)
- continue;
wt_mode = 0;
}
dpath->mode = wt_mode;
@@ -204,8 +204,6 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
perror(ce->name);
continue;
}
- if (silent_on_removed)
- continue;
diff_addremove(&revs->diffopt, '-', ce->ce_mode,
ce->sha1, !is_null_sha1(ce->sha1),
ce->name, 0);