<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/unit-tests, 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-06T22:42:49Z</updated>
<entry>
<title>Merge branch 'ps/odb-generic-object-name-handling'</title>
<updated>2026-04-06T22:42:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-06T22:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d75badf83bc3fc8e47413970874bac681eeb5bbe'/>
<id>urn:sha1:d75badf83bc3fc8e47413970874bac681eeb5bbe</id>
<content type='text'>
Object name handling (disambiguation and abbreviation) has been
refactored to be backend-generic, moving logic into the respective
object database backends.

* ps/odb-generic-object-name-handling:
  odb: introduce generic `odb_find_abbrev_len()`
  object-file: move logic to compute packed abbreviation length
  object-name: move logic to compute loose abbreviation length
  object-name: simplify computing common prefixes
  object-name: abbreviate loose object names without `disambiguate_state`
  object-name: merge `update_candidates()` and `match_prefix()`
  object-name: backend-generic `get_short_oid()`
  object-name: backend-generic `repo_collect_ambiguous()`
  object-name: extract function to parse object ID prefixes
  object-name: move logic to iterate through packed prefixed objects
  object-name: move logic to iterate through loose prefixed objects
  odb: introduce `struct odb_for_each_object_options`
  oidtree: extend iteration to allow for arbitrary return codes
  oidtree: modernize the code a bit
  object-file: fix sparse 'plain integer as NULL pointer' error
</content>
</entry>
<entry>
<title>Merge branch 'ps/clar-wo-path-max'</title>
<updated>2026-03-24T19:31:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-24T19:31:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d9cd3830f1f76009d17c408bd1d4f4e7a37b470'/>
<id>urn:sha1:9d9cd3830f1f76009d17c408bd1d4f4e7a37b470</id>
<content type='text'>
Clar (unit testing framework) update from the upstream.

* ps/clar-wo-path-max:
  clar: update to fix compilation on platforms without PATH_MAX
</content>
</entry>
<entry>
<title>oidtree: extend iteration to allow for arbitrary return codes</title>
<updated>2026-03-20T20:16:22Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-20T07:07:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe446b01aeaab307adcbfb39d4aaa72c37afbcda'/>
<id>urn:sha1:fe446b01aeaab307adcbfb39d4aaa72c37afbcda</id>
<content type='text'>
The interface `cb_each()` iterates through a crit-bit tree and calls a
specific callback function for each of the contained items. The callback
function is expected to return either:

  - `CB_CONTINUE` in case iteration shall continue.

  - `CB_BREAK` to abort iteration.

This is needlessly restrictive though, as callers may want to return
arbitrary values and have them be bubbled up to the `cb_each()` call
site. In fact, this is a rather common pattern we have: whenever such a
callback function returns a non-zero error code, we abort iteration and
bubble up the code as-is.

Refactor both the crit-bit tree and oidtree subsystems to behave
accordingly.

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>oidtree: modernize the code a bit</title>
<updated>2026-03-20T20:16:22Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-20T07:07:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1382e54a9c9e5f98271a943af9c10299c6ba934b'/>
<id>urn:sha1:1382e54a9c9e5f98271a943af9c10299c6ba934b</id>
<content type='text'>
The "oidtree.c" subsystem is rather small and self-contained and tends
to just work. It thus doesn't typically receive a lot of attention,
which has as a consequence that it's coding style is somewhat dated
nowadays.

Modernize the style of this subsystem a bit:

  - Rename the `oidtree_iter()` function to `oidtree_each_cb()`.

  - Rename `struct oidtree_iter_data` to `struct oidtree_each_data` to
    match the renamed callback function type.

  - Rename parameters and variables to clarify their intent.

  - Add comments that explain what some of the functions do.

  - Adapt the return value of `oidtree_contains()` to be a boolean.

This prepares for some changes to the subsystem that'll happen in the
next commit.

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 'ps/unit-test-c-escape-names.txt'</title>
<updated>2026-03-19T16:54:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-19T16:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=80595ab08ef501aef6d9b55856cdc9b092ed6e12'/>
<id>urn:sha1:80595ab08ef501aef6d9b55856cdc9b092ed6e12</id>
<content type='text'>
The unit test helper function was taught to use backslash +
mnemonic notation for certain control characters like "\t", instead
of octal notation like "\011".

* ps/unit-test-c-escape-names.txt:
  test-lib: print escape sequence names
</content>
</entry>
<entry>
<title>clar: update to fix compilation on platforms without PATH_MAX</title>
<updated>2026-03-16T17:00:41Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-03-16T07:50:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3cf4024117f5c15361e68c5d9b0c3e9dd01ec105'/>
<id>urn:sha1:3cf4024117f5c15361e68c5d9b0c3e9dd01ec105</id>
<content type='text'>
Update clar to e4172e3 (Merge pull request #134 from
clar-test/ethomson/const, 2026-01-10). Besides some changes to
"generate.py" which don't have any impact on us, this commit also fixes
compilation on platforms that don't have PATH_MAX, like for example
GNU/Hurd.

Reported-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
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 'sk/oidmap-clear-with-custom-free-func'</title>
<updated>2026-03-12T17:56:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-12T17:56:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a591a99d000059f10e9095bb2adee2d28c4318d'/>
<id>urn:sha1:9a591a99d000059f10e9095bb2adee2d28c4318d</id>
<content type='text'>
A bit of OIDmap API enhancement and cleanup.

* sk/oidmap-clear-with-custom-free-func:
  builtin/rev-list: migrate missing_objects cleanup to oidmap_clear_with_free()
  oidmap: make entry cleanup explicit in oidmap_clear
</content>
</entry>
<entry>
<title>test-lib: print escape sequence names</title>
<updated>2026-03-11T18:38:54Z</updated>
<author>
<name>Pablo Sabater</name>
<email>pabloosabaterr@gmail.com</email>
</author>
<published>2026-03-11T03:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e30e9442fd9b90d96dde2fad4a6b26d7a03dee5e'/>
<id>urn:sha1:e30e9442fd9b90d96dde2fad4a6b26d7a03dee5e</id>
<content type='text'>
When printing expected/actual characters in failed checks, use
their names (\a, \b, \n, ...) instead of their octal representation,
making it easier to read.

Add tests to test-example-tap.c
Update t0080-unit-test-output.sh to match the desired output

Teach 'print_one_char()' the equivalent name

Signed-off-by: Pablo Sabater &lt;pabloosabaterr@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>oidmap: make entry cleanup explicit in oidmap_clear</title>
<updated>2026-03-05T19:16:18Z</updated>
<author>
<name>Seyi Kufoiji</name>
<email>kuforiji98@gmail.com</email>
</author>
<published>2026-03-05T10:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a06a725c7847840ac56c0e797a829ac13abbe350'/>
<id>urn:sha1:a06a725c7847840ac56c0e797a829ac13abbe350</id>
<content type='text'>
Replace oidmap's use of hashmap_clear_() and layout-dependent freeing
with an explicit iteration and optional free callback. This removes
reliance on struct layout assumptions while keeping the existing API
intact.

Add tests for oidmap_clear_with_free behavior.
test_oidmap__clear_with_free_callback verifies that entries are freed
when a callback is provided, while
test_oidmap__clear_without_free_callback verifies that entries are not
freed when no callback is given. These tests ensure the new clear
implementation behaves correctly and preserves ownership semantics.

Signed-off-by: Seyi Kuforiji &lt;kuforiji98@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cc/lop-filter-auto'</title>
<updated>2026-02-25T19:54:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-02-25T19:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b5ad01886b9492d8662509604277fc88e705dcb'/>
<id>urn:sha1:6b5ad01886b9492d8662509604277fc88e705dcb</id>
<content type='text'>
"auto filter" logic for large-object promisor remote.

* cc/lop-filter-auto:
  fetch-pack: wire up and enable auto filter logic
  promisor-remote: change promisor_remote_reply()'s signature
  promisor-remote: keep advertised filters in memory
  list-objects-filter-options: support 'auto' mode for --filter
  doc: fetch: document `--filter=&lt;filter-spec&gt;` option
  fetch: make filter_options local to cmd_fetch()
  clone: make filter_options local to cmd_clone()
  promisor-remote: allow a client to store fields
  promisor-remote: refactor initialising field lists
</content>
</entry>
</feed>
