<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/xdiff, branch v2.33.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.33.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.33.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-07-13T23:52:50Z</updated>
<entry>
<title>Merge branch 'ab/pickaxe-pcre2'</title>
<updated>2021-07-13T23:52:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-13T23:52:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4da281e84d87b099ba8d0a255534dc1251be968e'/>
<id>urn:sha1:4da281e84d87b099ba8d0a255534dc1251be968e</id>
<content type='text'>
Rewrite the backend for "diff -G/-S" to use pcre2 engine when
available.

* ab/pickaxe-pcre2: (22 commits)
  xdiff-interface: replace discard_hunk_line() with a flag
  xdiff users: use designated initializers for out_line
  pickaxe -G: don't special-case create/delete
  pickaxe -G: terminate early on matching lines
  xdiff-interface: allow early return from xdiff_emit_line_fn
  xdiff-interface: prepare for allowing early return
  pickaxe -S: slightly optimize contains()
  pickaxe: rename variables in has_changes() for brevity
  pickaxe -S: support content with NULs under --pickaxe-regex
  pickaxe: assert that we must have a needle under -G or -S
  pickaxe: refactor function selection in diffcore-pickaxe()
  perf: add performance test for pickaxe
  pickaxe/style: consolidate declarations and assignments
  diff.h: move pickaxe fields together again
  pickaxe: die when --find-object and --pickaxe-all are combined
  pickaxe: die when -G and --pickaxe-regex are combined
  pickaxe tests: add missing test for --no-pickaxe-regex being an error
  pickaxe tests: test for -G, -S and --find-object incompatibility
  pickaxe tests: add test for "log -S" not being a regex
  pickaxe tests: add test for diffgrep_consume() internals
  ...
</content>
</entry>
<entry>
<title>Merge branch 'ab/xdiff-bug-cleanup'</title>
<updated>2021-07-08T20:15:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-08T20:15:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8e48f115aa742e2389beda39fa08e9d96ec9b084'/>
<id>urn:sha1:8e48f115aa742e2389beda39fa08e9d96ec9b084</id>
<content type='text'>
Code clean-up.

* ab/xdiff-bug-cleanup:
  xdiff: use BUG(...), not xdl_bug(...)
</content>
</entry>
<entry>
<title>xdiff: use BUG(...), not xdl_bug(...)</title>
<updated>2021-06-08T01:09:28Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-06-07T16:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=546096a5cbb4806462d0e8e8fa4a562fc173aa8d'/>
<id>urn:sha1:546096a5cbb4806462d0e8e8fa4a562fc173aa8d</id>
<content type='text'>
The xdl_bug() function was introduced in
e8adf23d1e (xdl_change_compact(): introduce the concept of a change
group, 2016-08-22), let's use our usual BUG() function instead.

We'll now have meaningful line numbers if we encounter bugs in xdiff,
and less code duplication.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/patience-diff-clean-up'</title>
<updated>2021-05-13T23:26:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-13T23:26:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=daffa8961bdd19c5aa66849d801162ef47432826'/>
<id>urn:sha1:daffa8961bdd19c5aa66849d801162ef47432826</id>
<content type='text'>
Code clean-up.

* pw/patience-diff-clean-up:
  patience diff: remove unused variable
  patience diff: remove unnecessary string comparisons
</content>
</entry>
<entry>
<title>xdiff-interface: replace discard_hunk_line() with a flag</title>
<updated>2021-05-11T03:47:31Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-12T17:15:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d93460024541909337d6b08a8bec10b71caaf73'/>
<id>urn:sha1:5d93460024541909337d6b08a8bec10b71caaf73</id>
<content type='text'>
Remove the dummy discard_hunk_line() function added in
3b40a090fd4 (diff: avoid generating unused hunk header lines,
2018-11-02) in favor of having a new XDL_EMIT_NO_HUNK_HDR flag, for
use along with the two existing and similar XDL_EMIT_* flags.

Unlike the recently amended xdiff_emit_line_fn interface which'll be
called in a loop in xdl_emit_diff(), the hunk header is only emitted
once.

It makes more sense to pass this as a flag than provide a dummy
callback because that function may be able to skip doing certain work
if it knows the caller is doing nothing with the hunk header.

It would be possible to do so in the case of -U0 now, but the benefit
of doing so is so small that I haven't bothered. But this leaves the
door open to that, and more importantly makes the API use more
intuitive.

The reason we're putting a flag in the gap between 1&lt;&lt;0 and 1&lt;&lt;2 is
that the old 1&lt;&lt;1 flag was removed in 907681e940d (xdiff: drop
XDL_EMIT_COMMON, 2016-02-23) without re-ordering the remaining flags.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>patience diff: remove unused variable</title>
<updated>2021-05-05T09:56:48Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2021-05-04T09:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f91371b9485932983e7dc81130e95dd176114829'/>
<id>urn:sha1:f91371b9485932983e7dc81130e95dd176114829</id>
<content type='text'>
Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>patience diff: remove unnecessary string comparisons</title>
<updated>2021-05-05T09:56:48Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2021-05-04T09:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=204aa2d24d83f308ef1ab128b1a7722daf9cfd56'/>
<id>urn:sha1:204aa2d24d83f308ef1ab128b1a7722daf9cfd56</id>
<content type='text'>
xdl_prepare_env() calls xdl_classify_record() which arranges for the
hashes of non-matching lines to be different so lines can be tested
for equality by comparing just their hashes.

This reduces the time taken to calculate the diff of v2.28.0 to
v2.29.0 by ~3-4%.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: add -I&lt;regex&gt; that ignores matching changes</title>
<updated>2020-10-20T19:53:26Z</updated>
<author>
<name>Michał Kępień</name>
<email>michal@isc.org</email>
</author>
<published>2020-10-20T06:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=296d4a94e7231a1d57356889f51bff57a1a3c5a1'/>
<id>urn:sha1:296d4a94e7231a1d57356889f51bff57a1a3c5a1</id>
<content type='text'>
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ń &lt;michal@isc.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>merge-base, xdiff: zero out xpparam_t structures</title>
<updated>2020-10-20T19:53:26Z</updated>
<author>
<name>Michał Kępień</name>
<email>michal@isc.org</email>
</author>
<published>2020-10-20T06:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ec7967cfafd5844e33afbc1e6fb8ba1b9e5b111b'/>
<id>urn:sha1:ec7967cfafd5844e33afbc1e6fb8ba1b9e5b111b</id>
<content type='text'>
xpparam_t structures are usually zero-initialized before their specific
fields are assigned to, but there are three locations in the tree where
that does not happen.  Add the missing memset() calls in order to make
initialization of xpparam_t structures consistent tree-wide and to
prevent stack garbage from being used as field values.

Signed-off-by: Michał Kępień &lt;michal@isc.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/xdiff-ignore-ws-w-func-context'</title>
<updated>2019-12-16T21:08:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-16T21:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f0070a7df98540ebd0ba6ecb7aef4620efe27724'/>
<id>urn:sha1:f0070a7df98540ebd0ba6ecb7aef4620efe27724</id>
<content type='text'>
The "diff" machinery learned not to lose added/removed blank lines
in the context when --ignore-blank-lines and --function-context are
used at the same time.

* rs/xdiff-ignore-ws-w-func-context:
  xdiff: unignore changes in function context
</content>
</entry>
</feed>
