<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/xdiff, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-04-08T21:11:55Z</updated>
<entry>
<title>xdiff: reduce the size of array</title>
<updated>2026-04-08T21:11:55Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2026-04-02T14:57:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=40c92ff457ece00aced93f2fcc6014b916d9fcf8'/>
<id>urn:sha1:40c92ff457ece00aced93f2fcc6014b916d9fcf8</id>
<content type='text'>
When the myers algorithm is selected the input files are pre-processed
to remove any common prefix and suffix and any lines that appear
in only one file. This requires a map to be created between the
lines that are processed by the myers algorithm and the lines in
the original file. That map does not include the common lines at the
beginning and end of the files but the array is allocated to be the
size of the whole file. Move the allocation into xdl_cleanup_records()
where the map is populated and we know how big it needs to be.

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>xprepare: simplify error handling</title>
<updated>2026-04-08T21:11:55Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2026-04-02T14:57:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8c9d203485b2983ef87ab72f7a9b7853da0707ca'/>
<id>urn:sha1:8c9d203485b2983ef87ab72f7a9b7853da0707ca</id>
<content type='text'>
If either of the two allocations fail we want to take the same action
so use a single if statement. This saves a few lines and makes it
easier for the next commit to add a couple more allocations.

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>xdiff: cleanup xdl_clean_mmatch()</title>
<updated>2026-04-08T21:11:53Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2026-04-02T14:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=77c188e4a6f4b401462768029a13100c55dfe312'/>
<id>urn:sha1:77c188e4a6f4b401462768029a13100c55dfe312</id>
<content type='text'>
Remove the "s" parameter as, since the last commit, this function
is always called with s == 0. Also change parameter "e" to expect a
length, rather than the index of the last line to simplify the caller.

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>xdiff: reduce size of action arrays</title>
<updated>2026-04-08T21:09:32Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2026-04-02T14:57:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9232a7adf89cdb253d0c6669a0dc59155c59b0d3'/>
<id>urn:sha1:9232a7adf89cdb253d0c6669a0dc59155c59b0d3</id>
<content type='text'>
When the myers algorithm is selected the input files are pre-processed
to remove any common prefix and suffix. Then any lines that appear
only in one side of the diff are marked as changed and frequently
occurring lines are marked as changed if they are adjacent to a
changed line. This step requires a couple of temporary arrays. As as
the common prefix and suffix have already been removed, the arrays
only need to be big enough to hold the lines between them, not the
whole file. Reduce the size of the arrays and adjust the loops that
use them accordingly while taking care to keep indexing the arrays
in xdfile_t with absolute line numbers.

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>Merge branch 'en/xdiff-cleanup-3' into pw/xdiff-shrink-memory-consumption</title>
<updated>2026-04-08T21:01:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-08T21:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c97ac7976518a0f2d08f37f0da72918e5ba5d04a'/>
<id>urn:sha1:c97ac7976518a0f2d08f37f0da72918e5ba5d04a</id>
<content type='text'>
* en/xdiff-cleanup-3:
  xdiff/xdl_cleanup_records: put braces around the else clause
  xdiff/xdl_cleanup_records: make setting action easier to follow
  xdiff/xdl_cleanup_records: make limits more clear
  xdiff/xdl_cleanup_records: use unambiguous types
  xdiff: use unambiguous types in xdl_bogo_sqrt()
  xdiff/xdl_cleanup_records: delete local recs pointer
</content>
</entry>
<entry>
<title>xdiff/xdl_cleanup_records: put braces around the else clause</title>
<updated>2026-04-08T20:57:46Z</updated>
<author>
<name>Ezekiel Newren</name>
<email>ezekielnewren@gmail.com</email>
</author>
<published>2026-04-08T20:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ee3c64b97fcce85c590971c2bfe2b2c91a840ea'/>
<id>urn:sha1:0ee3c64b97fcce85c590971c2bfe2b2c91a840ea</id>
<content type='text'>
Signed-off-by: Ezekiel Newren &lt;ezekielnewren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff/xdl_cleanup_records: make setting action easier to follow</title>
<updated>2026-04-08T20:57:45Z</updated>
<author>
<name>Ezekiel Newren</name>
<email>ezekielnewren@gmail.com</email>
</author>
<published>2026-04-08T20:26:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7e8d804028cc9a9b5a1b832cc6ec3078a81e3e3'/>
<id>urn:sha1:e7e8d804028cc9a9b5a1b832cc6ec3078a81e3e3</id>
<content type='text'>
Rewrite nested ternaries with a clear if/else ladder for
action1/action2 to improve readability while preserving
behavior.

Signed-off-by: Ezekiel Newren &lt;ezekielnewren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff/xdl_cleanup_records: make limits more clear</title>
<updated>2026-04-08T20:57:45Z</updated>
<author>
<name>Ezekiel Newren</name>
<email>ezekielnewren@gmail.com</email>
</author>
<published>2026-04-08T20:26:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59cb212e849749f61d3db6e2565c7c63d7a637e6'/>
<id>urn:sha1:59cb212e849749f61d3db6e2565c7c63d7a637e6</id>
<content type='text'>
Make the handling of per-file limits and the minimal-case clearer.
  * Use explicit per-file limit variables (mlim1, mlim2) and initialize
    them.
  * The additional condition `!need_min` is redudant now, remove it.
Best viewed with --color-words.

Signed-off-by: Ezekiel Newren &lt;ezekielnewren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff/xdl_cleanup_records: use unambiguous types</title>
<updated>2026-04-08T20:57:45Z</updated>
<author>
<name>Ezekiel Newren</name>
<email>ezekielnewren@gmail.com</email>
</author>
<published>2026-04-08T20:26:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=042cefe77b10d2610c0410adf555274a6152503f'/>
<id>urn:sha1:042cefe77b10d2610c0410adf555274a6152503f</id>
<content type='text'>
Change the parameters of xdl_clean_mmatch() and the local variables
i, nm, mlim in xdl_cleanup_records() to use unambiguous types. Best
viewed with --color-words.

Signed-off-by: Ezekiel Newren &lt;ezekielnewren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xdiff: use unambiguous types in xdl_bogo_sqrt()</title>
<updated>2026-04-08T20:57:45Z</updated>
<author>
<name>Ezekiel Newren</name>
<email>ezekielnewren@gmail.com</email>
</author>
<published>2026-04-08T20:26:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e85a4167dde8cf6e1357e063c400a3d5c3a0e897'/>
<id>urn:sha1:e85a4167dde8cf6e1357e063c400a3d5c3a0e897</id>
<content type='text'>
There is no real square root for a negative number and size_t may not
be large enough for certain applications, replace long with uint64_t.

Signed-off-by: Ezekiel Newren &lt;ezekielnewren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
