<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/unit-tests, branch maint</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=maint</id>
<link rel='self' href='https://git.shady.money/git/atom?h=maint'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-01-15T15:12:41Z</updated>
<entry>
<title>Merge branch 'ps/clar-integers'</title>
<updated>2026-01-15T15:12:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-01-15T15:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87e278d8377fbc62fb8d2a51fd795529178072d6'/>
<id>urn:sha1:87e278d8377fbc62fb8d2a51fd795529178072d6</id>
<content type='text'>
Import newer version of "clar", unit testing framework.

* ps/clar-integers:
  gitattributes: disable blank-at-eof errors for clar test expectations
  t/unit-tests: demonstrate use of integer comparison assertions
  t/unit-tests: update clar to 39f11fe
</content>
</entry>
<entry>
<title>t/unit-tests: demonstrate use of integer comparison assertions</title>
<updated>2025-12-06T22:25:16Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-12-06T11:47:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2e53d29f53e2a4c6bb5b9f8f3169c178e5ef62a0'/>
<id>urn:sha1:2e53d29f53e2a4c6bb5b9f8f3169c178e5ef62a0</id>
<content type='text'>
The clar project has introduced a couple of new assertions that perform
relative integer comparisons, like "greater than" or "less or equal".
Adapt the reftable-record unit tests to demonstrate their usage.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/unit-tests: update clar to 39f11fe</title>
<updated>2025-12-06T22:25:15Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-12-06T11:47:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5e4aef3586c07c31e3e4d76ce7fdf0f9843314f'/>
<id>urn:sha1:d5e4aef3586c07c31e3e4d76ce7fdf0f9843314f</id>
<content type='text'>
Update clar to commit 39f11fe (Merge pull request #131 from
pks-gitlab/pks-integer-double-evaluation, 2025-12-05). This commit
includes the following changes relevant to Git:

  - There are now typesafe integer comparison functions. Furthermore,
    the range of comparison functions has been included to also have
    relative comparisons, like "greater than".

  - There is a new `cl_failf()` macro that allows the caller to specify
    an error message with formatting directives.

  - The TAP format has been fixed to correctly terminate YAML blocks
    with "...\n" instead of "---\n".

Note that we already had a `cl_failf()` function declared in our own
sources. This function is equivalent to the upstreamed function, so we
can simply drop it now.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/ci-windows-meson-test-fix'</title>
<updated>2025-11-26T18:32:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-26T18:32:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=536d284f3b351c301181df9844a6abae65959c8a'/>
<id>urn:sha1:536d284f3b351c301181df9844a6abae65959c8a</id>
<content type='text'>
"Windows+meson" job at the GitHub Actions CI was hard to debug, as
it did not show and save failed test artifacts, which has been
corrected.

* jk/ci-windows-meson-test-fix:
  ci(windows-meson-test): handle options and output like other test jobs
  unit-test: ignore --no-chain-lint
</content>
</entry>
<entry>
<title>Merge branch 'jx/repo-struct-utf8width-fix'</title>
<updated>2025-11-24T23:46:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-24T23:46:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a5d5c50160a9113883d3a8993bf40fdf65207999'/>
<id>urn:sha1:a5d5c50160a9113883d3a8993bf40fdf65207999</id>
<content type='text'>
The "git repo structure" subcommand tried to align its output but
mixed up byte count and display column width, which has been
corrected.

* jx/repo-struct-utf8width-fix:
  builtin/repo: fix table alignment for UTF-8 characters
  t/unit-tests: add UTF-8 width tests for CJK chars
</content>
</entry>
<entry>
<title>unit-test: ignore --no-chain-lint</title>
<updated>2025-11-18T17:45:28Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2025-11-18T09:32:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e96105aa1741ebb61c17a59aee962058a3743e09'/>
<id>urn:sha1:e96105aa1741ebb61c17a59aee962058a3743e09</id>
<content type='text'>
In the same spirit as 9faf3963b6 (t: introduce compatibility options to
clar-based tests, 2024-12-13), we should ignore --no-chain-lint passed
to our clar tests, since it may appear in GIT_TEST_OPTS to be used with
other tests.

This is particularly important on Windows CI, where --no-chain-lint is
added to the test options by default, and the meson build will pass all
options to the unit tests. The only reason our meson Windows CI job does
not run into this currently is that it is not respecting GIT_TEST_OPTS
at all! So ignoring this option is a prerequisite to fixing that
situation.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/repo: fix table alignment for UTF-8 characters</title>
<updated>2025-11-17T00:04:24Z</updated>
<author>
<name>Jiang Xin</name>
<email>worldhello.net@gmail.com</email>
</author>
<published>2025-11-15T13:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a03a10a3a746dd8565a3a0e6126f60523b41738'/>
<id>urn:sha1:7a03a10a3a746dd8565a3a0e6126f60523b41738</id>
<content type='text'>
The output table from "git repo structure" is misaligned when displaying
UTF-8 characters (e.g., non-ASCII glyphs). E.g.:

    | 仓库结构   | 值  |
    | -------------- | ---- |
    | * 引用       |      |
    |   * 计数     |   67 |

The previous implementation used simple width formatting with printf()
which didn't properly handle multi-byte UTF-8 characters, causing
misaligned table columns when displaying repository structure
information.

This change modifies the stats_table_print_structure function to use
strbuf_utf8_align() instead of basic printf width specifiers. This
ensures proper column alignment regardless of the character encoding of
the content being displayed.

Also add test cases for strbuf_utf8_align(), a function newly introduced
in "builtin/repo.c".

Signed-off-by: Jiang Xin &lt;worldhello.net@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/unit-tests: add UTF-8 width tests for CJK chars</title>
<updated>2025-11-17T00:04:24Z</updated>
<author>
<name>Jiang Xin</name>
<email>worldhello.net@gmail.com</email>
</author>
<published>2025-11-15T13:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=878fef8ebf6cf513842de14284ee58f4d92fcef3'/>
<id>urn:sha1:878fef8ebf6cf513842de14284ee58f4d92fcef3</id>
<content type='text'>
The file "builtin/repo.c" uses utf8_strwidth() to calculate the display
width of UTF-8 characters in a table, but the resulting output is still
misaligned. Add test cases for both utf8_strwidth and utf8_strnwidth to
verify that they correctly compute the display width for UTF-8
characters.

Also updated the build configuration in Makefile and meson.build to
include the new test suite in the build process.

Signed-off-by: Jiang Xin &lt;worldhello.net@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>reftable/stack: add function to check if optimization is required</title>
<updated>2025-11-10T17:28:47Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2025-11-08T21:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e35155588aa9f0355eb7e116ea418c189479f62d'/>
<id>urn:sha1:e35155588aa9f0355eb7e116ea418c189479f62d</id>
<content type='text'>
The reftable backend performs auto-compaction as part of its regular
flow, which is required to keep the number of tables part of a stack at
bay. This allows it to stay optimized.

Compaction can also be triggered voluntarily by the user via the 'git
pack-refs' or the 'git refs optimize' command. However, currently there
is no way for the user to check if optimization is required without
actually performing it.

Extract out the heuristics logic from 'reftable_stack_auto_compact()'
into an internal function 'update_segment_if_compaction_required()'.
Then use this to add and expose `reftable_stack_compaction_required()`
which will allow users to check if the reftable backend can be
optimized.

Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Acked-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kn/reftable-consistency-checks'</title>
<updated>2025-10-14T05:00:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-14T05:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f50f046794a06cfb97c4ccc879b08788629dd067'/>
<id>urn:sha1:f50f046794a06cfb97c4ccc879b08788629dd067</id>
<content type='text'>
The reftable backend learned to sanity check its on-disk data more
carefully.

* kn/reftable-consistency-checks:
  refs/reftable: add fsck check for checking the table name
  reftable: add code to facilitate consistency checks
  fsck: order 'fsck_msg_type' alphabetically
  Documentation/fsck-msgids: remove duplicate msg id
  reftable: check for trailing newline in 'tables.list'
  refs: move consistency check msg to generic layer
  refs: remove unused headers
</content>
</entry>
</feed>
