diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-09 14:28:35 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-09 14:28:35 -0700 |
commit | 01a2a03c56e8d4cd9724b185a48a2a1ea9852f0c (patch) | |
tree | 85753a9502a729d3be359996a9e98b8532515e8e /diff-lib.c | |
parent | a5e10f8bc1db418fc806abb7574bb1e468948d19 (diff) | |
parent | 95a7c546b02a962b9e458f7fd2d0ed9b657c0ca6 (diff) | |
download | git-01a2a03c56e8d4cd9724b185a48a2a1ea9852f0c.tar.gz |
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.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/diff-lib.c b/diff-lib.c index b6f4b21637..f1a9053168 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); |