1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-09 06:46:16 +02:00
git/xdiff
Michał Kępień 296d4a94e7 diff: add -I<regex> that ignores matching changes
Add a new diff option that enables ignoring changes whose all lines
(changed, removed, and added) match a given regular expression.  This is
similar to the -I/--ignore-matching-lines option in standalone diff
utilities and can be used e.g. to ignore changes which only affect code
comments or to look for unrelated changes in commits containing a large
number of automatically applied modifications (e.g. a tree-wide string
replacement).  The difference between -G/-S and the new -I option is
that the latter filters output on a per-change basis.

Use the 'ignore' field of xdchange_t for marking a change as ignored or
not.  Since the same field is used by --ignore-blank-lines, identical
hunk emitting rules apply for --ignore-blank-lines and -I.  These two
options can also be used together in the same git invocation (they are
complementary to each other).

Rename xdl_mark_ignorable() to xdl_mark_ignorable_lines(), to indicate
that it is logically a "sibling" of xdl_mark_ignorable_regex() rather
than its "parent".

Signed-off-by: Michał Kępień <michal@isc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-20 12:53:26 -07:00
..
xdiff.h diff: add -I<regex> that ignores matching changes 2020-10-20 12:53:26 -07:00
xdiffi.c diff: add -I<regex> that ignores matching changes 2020-10-20 12:53:26 -07:00
xdiffi.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xemit.c xdiff: unignore changes in function context 2019-12-05 09:30:06 -08:00
xemit.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xhistogram.c merge-base, xdiff: zero out xpparam_t structures 2020-10-20 12:53:26 -07:00
xinclude.h xdiff: use git-compat-util 2019-04-12 13:34:17 +09:00
xmacros.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xmerge.c Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xpatience.c merge-base, xdiff: zero out xpparam_t structures 2020-10-20 12:53:26 -07:00
xprepare.c Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xprepare.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xtypes.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xutils.c xdiff: drop system includes in xutils.c 2019-07-28 21:51:19 -07:00
xutils.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00