<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/unit-tests, branch v2.52.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.52.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.52.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-10-14T05:00:35Z</updated>
<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>
<entry>
<title>reftable: check for trailing newline in 'tables.list'</title>
<updated>2025-10-07T16:22:57Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2025-10-07T12:11:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f6442063775b68d9eeaeb9088379fba3298c80ac'/>
<id>urn:sha1:f6442063775b68d9eeaeb9088379fba3298c80ac</id>
<content type='text'>
In the reftable format, the 'tables.list' file contains a
newline separated list of tables. While we parse this file, we do not
check or care about the last newline. Tighten the parser in
`parse_names()` to return an appropriate error if the last newline is
missing.

This requires modification to `parse_names()` to now return the error
while accepting the output as a third argument.

Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/clar-updates'</title>
<updated>2025-09-29T18:40:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-09-29T18:40:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=347af012dba8794d003e4ae061131e3b7acdd558'/>
<id>urn:sha1:347af012dba8794d003e4ae061131e3b7acdd558</id>
<content type='text'>
Import a newer version of the clar unit testing framework.

* ps/clar-updates:
  t/unit-tests: update to 10e96bc
  t/unit-tests: update clar to fcbed04
</content>
</entry>
<entry>
<title>t/unit-tests: update to 10e96bc</title>
<updated>2025-09-22T17:09:03Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-09-22T13:16:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93dbb6b3c572fc8877b56233730b5d12b327a7a4'/>
<id>urn:sha1:93dbb6b3c572fc8877b56233730b5d12b327a7a4</id>
<content type='text'>
Update to 10e96bc (Merge pull request #127 from
pks-gitlab/pks-ci-improvements, 2025-09-22). This commit includes a
couple of changes:

  - The GitHub CI has been updated to include a 32 bit CI job.
    Furthermore, the jobs now compile with "-Werror" and more warnings
    enabled.

  - An issue was addressed where `uintptr_t` is not available on
    NonStop [1].

  - The clar selftests have been restructured so that it is now possible
    to add small test suites more readily. This was done to add tests
    for the above addressed issue, where we now use "%p" to print
    pointers in a platform dependent way.

  - An issue was addressed where the test output had a trailing
    whitespace with certain output formats, which caused whitespace
    issues in the test expectation files.

[1]: &lt;01c101dc2842$38903640$a9b0a2c0$@nexbridge.com&gt;

Reported-by: Randall S. Becker &lt;rsbecker@nexbridge.com&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>t/unit-tests: update clar to fcbed04</title>
<updated>2025-09-11T16:08:49Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-09-10T13:09:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7f04f651ac4550db3572720027503617d62ffeb'/>
<id>urn:sha1:e7f04f651ac4550db3572720027503617d62ffeb</id>
<content type='text'>
Update clar to fcbed04 (Merge pull request #123 from
pks-gitlab/pks-sandbox-ubsan, 2025-09-10). The most significant changes
since the last version include:

  - Fixed platform support for HP-UX.

  - Fixes for how clar handles the `-q` flag.

  - A couple of leak fixes for reported clar errors.

  - A new `cl_invoke()` function that retains line information.

  - New infrastructure to create temporary directories.

  - Improved printing of error messages so that all lines are now
    properly indented.

  - Proper selftests for the clar.

Most of these changes are somewhat irrelevant to us, but neither do we
have to adjust to any of these changes, either. What _is_ interesting to
us though is especially the fixed support for HP-UX, and eventually we
may also want to use `cl_invoke()`.

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/reftable-libgit2-cleanup'</title>
<updated>2025-08-29T16:44:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-29T16:44:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=00c2c50ea67c78632051a97b6ef853c97a227731'/>
<id>urn:sha1:00c2c50ea67c78632051a97b6ef853c97a227731</id>
<content type='text'>
Code clean-ups.

* ps/reftable-libgit2-cleanup:
  refs/reftable: always reload stacks when creating lock
  reftable: don't second-guess errors from flock interface
  reftable/stack: handle outdated stacks when compacting
  reftable/stack: allow passing flags to `reftable_stack_add()`
  reftable/stack: fix compiler warning due to missing braces
  reftable/stack: reorder code to avoid forward declarations
  reftable/writer: drop Git-specific `QSORT()` macro
  reftable/writer: fix type used for number of records
</content>
</entry>
<entry>
<title>Merge branch 'tc/diff-tree-max-depth'</title>
<updated>2025-08-25T21:22:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-25T21:22:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=109c3df14ccf372c2438a470bdfb566265399f0a'/>
<id>urn:sha1:109c3df14ccf372c2438a470bdfb566265399f0a</id>
<content type='text'>
"git diff-tree" learned "--max-depth" option.

* tc/diff-tree-max-depth:
  diff: teach tree-diff a max-depth parameter
  within_depth: fix return for empty path
  combine-diff: zero memory used for callback filepairs
</content>
</entry>
<entry>
<title>Merge branch 'jc/string-list-split'</title>
<updated>2025-08-21T20:46:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-21T20:46:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=971ba42dd426f2531d5448488bcd3bd3282e6999'/>
<id>urn:sha1:971ba42dd426f2531d5448488bcd3bd3282e6999</id>
<content type='text'>
string_list_split*() family of functions have been extended to
simplify common use cases.

* jc/string-list-split:
  string-list: split-then-remove-empty can be done while splitting
  string-list: optionally omit empty string pieces in string_list_split*()
  diff: simplify parsing of diff.colormovedws
  string-list: optionally trim string pieces split by string_list_split*()
  string-list: unify string_list_split* functions
  string-list: align string_list_split() with its _in_place() counterpart
  string-list: report programming error with BUG
</content>
</entry>
<entry>
<title>reftable/stack: allow passing flags to `reftable_stack_add()`</title>
<updated>2025-08-12T14:40:59Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-08-12T09:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=178c5885007b83dd10cac1e09b72ef8d9fe2ac29'/>
<id>urn:sha1:178c5885007b83dd10cac1e09b72ef8d9fe2ac29</id>
<content type='text'>
The `reftable_stack_add()` function is a simple wrapper to lock the
stack, add records to it via a callback and then commit the
result. One problem with it though is that it doesn't accept any flags
for creating the addition. This makes it impossible to automatically
reload the stack in case it was modified before we managed to lock the
stack.

Add a `flags` field to plug this gap and pass it through accordingly.
For now this new flag won't be used by us, but it will be used by
libgit2.

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>within_depth: fix return for empty path</title>
<updated>2025-08-07T22:29:34Z</updated>
<author>
<name>Toon Claes</name>
<email>toon@iotcl.com</email>
</author>
<published>2025-08-07T20:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a43e0e5503f52fd4c06faddf6c83b5678dedfe3'/>
<id>urn:sha1:2a43e0e5503f52fd4c06faddf6c83b5678dedfe3</id>
<content type='text'>
The within_depth() function is used to check whether pathspecs limited
by a max-depth parameter are acceptable. It takes a path to check, a
maximum depth, and a "base" depth. It counts the components in the
path (by counting slashes), adds them to the base, and compares them to
the maximum.

However, if the base does not have any slashes at all, we always return
`true`. If the base depth is 0, then this is correct; no matter what the
maximum is, we are always within it. However, if the base depth is
greater than 0, then we might return an erroneous result.

This ends up not causing any user-visible bugs in the current code. The
call sites in dir.c always pass a base depth of 0, so are unaffected.
But tree_entry_interesting() uses this function differently: it will
pass the prefix of the current entry, along with a `1` if the entry is a
directory, in essence checking whether items inside the entry would be
of interest. It turns out not to make a difference in behavior, but the
reasoning is complex.

Given a tree like:

  file
  a/file
  a/b/file

walking the tree and calling tree_entry_interesting() will yield the
following results:

  (with max_depth=0):
      file: yes
         a: yes
    a/file: no
       a/b: no

  (with max_depth=1):
      file: yes
         a: yes
    a/file: yes
       a/b: no

So we have inconsistent behavior in considering directories interesting.
If they are at the edge of our depth but at the root, we will recurse
into them, but then find all of their entries uninteresting (e.g., in
the first case, we will look at "a" but find "a/*" uninteresting). But
if they are at the edge of our depth and not at the root, then we will
not recurse (in the second example, we do not even bother entering
"a/b").

This turns out not to matter because the only caller which uses
max-depth pathspecs is cmd_grep(), which only cares about blob entries.
From its perspective, it is exactly the same to not recurse into a
subtree, or to recurse and find that it contains no matching entries.
Not recursing is merely an optimization.

It is debatable whether tree_entry_interesting() should consider such an
entry interesting. The only caller does not care if it sees the tree
itself, and can benefit from the optimization. But if we add a
"max-depth" limiter to regular diffs, then a diff with
DIFF_OPT_TREE_IN_RECURSIVE would probably want to show the tree itself,
but not what it contains.

This patch just fixes within_depth(), which means we consider such
entries uninteresting (and makes the current caller happy). If we want
to change that in the future, then this fix is still the correct first
step, as the current behavior is simply inconsistent.

This has the effect the function tree_entry_interesting() now behaves
like following on the first example:

  (with max_depth=0):
      file: yes
         a: no
    a/file: no
       a/b: no

Meaning we won't step in "a/" no more to realize all "a/*" entries are
uninterested, but we stop at the tree entry itself.

Based-on-patch-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Toon Claes &lt;toon@iotcl.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
