<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/diffcore-delta.c, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2026-02-03T17:41:52Z</updated>
<entry>
<title>cocci: extend MEMZERO_ARRAY() rules</title>
<updated>2026-02-03T17:41:52Z</updated>
<author>
<name>Toon Claes</name>
<email>toon@iotcl.com</email>
</author>
<published>2026-02-03T10:29:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=60614838a44591c1449f939236f396bb7164b5ef'/>
<id>urn:sha1:60614838a44591c1449f939236f396bb7164b5ef</id>
<content type='text'>
Recently the MEMZERO_ARRAY() macro was introduced. In that commit also
coccinelle rules were added to capture cases that can be converted to
use that macro.

Later a few more cases were manually converted to use the macro, but
coccinelle didn't capture those. Extend the rules to capture those as
well.

In various cases the code could be further beautified by removing
parentheses which are no longer needed. Modify the coccinelle rules to
optimize those as well and fix them.

During conversion indentation also used spaces where tabs should be
used, fix that in one go.

Signed-off-by: Toon Claes &lt;toon@iotcl.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cocci: use MEMZERO_ARRAY() a bit more</title>
<updated>2025-12-13T01:47:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-12-13T01:46:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=8ea9492cf3505c379d1c573b02db90e6b480cc75'/>
<id>urn:sha1:8ea9492cf3505c379d1c573b02db90e6b480cc75</id>
<content type='text'>
Existing code in files that have been fairly stable trigger the
"make coccicheck" suggestions due to the new check.

Rewrite them to use MEMZERO_ARRAY()

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/diffcore-delta-final-line-fix'</title>
<updated>2024-01-30T00:03:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-30T00:03:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=d3bf8d32d32e628e551a71004f7c6f60d87f1a39'/>
<id>urn:sha1:d3bf8d32d32e628e551a71004f7c6f60d87f1a39</id>
<content type='text'>
Rename detection logic ignored the final line of a file if it is an
incomplete line.

* en/diffcore-delta-final-line-fix:
  diffcore-delta: avoid ignoring final 'line' of file
</content>
</entry>
<entry>
<title>diffcore-delta: avoid ignoring final 'line' of file</title>
<updated>2024-01-19T03:10:11Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2024-01-13T04:26:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=1c5bc6971e28c581b17b812cbbd1f09e39f0bb63'/>
<id>urn:sha1:1c5bc6971e28c581b17b812cbbd1f09e39f0bb63</id>
<content type='text'>
hash_chars() would hash lines to integers, and store them in a spanhash,
but cut lines at 64 characters.  Thus, whenever it reached 64 characters
or a newline, it would create a new spanhash.  The problem is, the final
part of the file might not end 64 characters after the previous 'line'
and might not end with a newline.  This could, for example, cause an
85-byte file with 12 lines and only the first character in the file
differing to appear merely 23% similar rather than the expected 97%.
Ensure the last line is included, and add a testcase that would have
caught this problem.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: remove unnecessary includes in source files</title>
<updated>2023-12-26T20:04:31Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-12-23T17:14:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=eea0e59ffbed6e33d171ace5be13cde9faa41639'/>
<id>urn:sha1:eea0e59ffbed6e33d171ace5be13cde9faa41639</id>
<content type='text'>
Each of these were checked with
   gcc -E -I. ${SOURCE_FILE} | grep ${HEADER_FILE}
to ensure that removing the direct inclusion of the header actually
resulted in that header no longer being included at all (i.e. that
no other header pulled it in transitively).

...except for a few cases where we verified that although the header
was brought in transitively, nothing from it was directly used in
that source file.  These cases were:
  * builtin/credential-cache.c
  * builtin/pull.c
  * builtin/send-pack.c

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object.h: stop depending on cache.h; make cache.h depend on object.h</title>
<updated>2023-02-24T01:25:29Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a64215b6cd5e67939187475c5b248dc5d13e3d60'/>
<id>urn:sha1:a64215b6cd5e67939187475c5b248dc5d13e3d60</id>
<content type='text'>
Things should be able to depend on object.h without pulling in all of
cache.h.  Move an enum to allow this.

Note that a couple files previously depended on things brought in
through cache.h indirectly (revision.h -&gt; commit.h -&gt; object.h -&gt;
cache.h).  As such, this change requires making existing dependencies
more explicit in half a dozen files.  The inclusion of strbuf.h in
some headers if of particular note: these headers directly embedded a
strbuf in some new structs, meaning they should have been including
strbuf.h all along but were indirectly getting the necessary
definitions.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-delta.c: LLP64 compatibility, upcast unity for left shift</title>
<updated>2021-12-01T22:48:10Z</updated>
<author>
<name>Philip Oakley</name>
<email>philipoakley@iee.email</email>
</author>
<published>2021-12-01T00:29:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=62e8452c8c0ecdd7af5ff1e0c8cefaf153216d12'/>
<id>urn:sha1:62e8452c8c0ecdd7af5ff1e0c8cefaf153216d12</id>
<content type='text'>
Visual Studio reports C4334 "was 64-bit shift intended" warning
because of size miss-match.

Promote unity to the matching type to fit with its subsequent operation.

Signed-off-by: Philip Oakley &lt;philipoakley@iee.email&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff.c: reduce implicit dependency on the_index</title>
<updated>2018-09-21T16:48:10Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-09-21T15:57:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b78ea5fc3574a2ce262cfb37a7ea890caddd0cf5'/>
<id>urn:sha1:b78ea5fc3574a2ce262cfb37a7ea890caddd0cf5</id>
<content type='text'>
diff and textconv code has so widespread use that it's hard to simply
update their api and all call sites at once because it would result in
a big patch. For now reduce the_index references to two places:
diff_setup() and fill_textconv().

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diffcore-delta: rename 'new' variables</title>
<updated>2018-02-22T18:08:05Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2018-02-14T18:59:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=94a5c5d5b095299f0d693d7d82608a60b23692a4'/>
<id>urn:sha1:94a5c5d5b095299f0d693d7d82608a60b23692a4</id>
<content type='text'>
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tk/diffcore-delta-remove-unused'</title>
<updated>2016-11-17T21:45:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-11-17T21:45:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6d40812e4b5d2128665351f4b427c7da7c7d86d5'/>
<id>urn:sha1:6d40812e4b5d2128665351f4b427c7da7c7d86d5</id>
<content type='text'>
Code cleanup.

* tk/diffcore-delta-remove-unused:
  diffcore-delta: remove unused parameter to diffcore_count_changes()
</content>
</entry>
</feed>
