<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t, branch main</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=main</id>
<link rel='self' href='https://git.shady.money/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-04-16T22:43:26Z</updated>
<entry>
<title>Merge branch 'jk/midx-write-v1-by-default'</title>
<updated>2026-04-16T22:43:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-16T22:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e60b8306f1fe4bdce1ad66652563565b60b37c00'/>
<id>urn:sha1:e60b8306f1fe4bdce1ad66652563565b60b37c00</id>
<content type='text'>
As writing version 2 MIDX files by default breaks older versions of
Git and its reimplementations, use V2 only when necessary.

* jk/midx-write-v1-by-default:
  MIDX: revert the default version to v1
</content>
</entry>
<entry>
<title>MIDX: revert the default version to v1</title>
<updated>2026-04-16T20:45:53Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2026-04-16T20:06:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a12382f99488b8cea82f59a310084e43ff84e99b'/>
<id>urn:sha1:a12382f99488b8cea82f59a310084e43ff84e99b</id>
<content type='text'>
We introduced midx version 2 in b2ec8e90c2 (midx: do not require packs
to be sorted in lexicographic order, 2026-02-24) and now write it by
default. The rationale was that older versions should ignore the v2 midx
and fall back to using the packs (just like we do for other midx
errors). Unfortunately this is not the case, as we have a hard die()
when we see an unknown midx version.

As a result, writing a midx with Git 2.54-rc2 puts the repository into a
state that is unusable with Git 2.53. And this midx write may happen
behind the scenes as part of normal operations, like fetch.

Let's switch back to writing v1 by default to avoid regressing the case
where multiple versions of Git are used on the same repository.

There is one gotcha, though: the v2 format is required for some new
features, like midx compaction, and running "git multi-pack-index
compact" will complain when asked to write a v1 index. The user must set
midx.version to "2" to make the feature work.

So instead of always using v1, we'll base the default on whether the
requested feature requires v2. That does mean that running midx
compaction will create a repository that can't be read by older versions
of Git. But we never do that by default; only people experimenting with
the new feature will be affected.

We have to adjust the test expectation in t5319, since it will now
generate v1 files. And our "auto-select v2" is covered by the tests in
t5335, which continue to check that compaction works without having to
set midx.version manually (and also explicitly check that asking for v1
with compaction reports the problem).

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>Merge branch 'ds/rev-list-maximal-only-optim'</title>
<updated>2026-04-09T18:21:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-09T18:21:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c343f9cdc25a8281d1e21ee083f1cd77f82cacd7'/>
<id>urn:sha1:c343f9cdc25a8281d1e21ee083f1cd77f82cacd7</id>
<content type='text'>
"git rev-list --maximal-only" has been optimized by borrowing the
logic used by "git show-branch --independent", which computes the
same kind of information much more efficiently.

* ds/rev-list-maximal-only-optim:
  rev-list: use reduce_heads() for --maximal-only
  p6011: add perf test for rev-list --maximal-only
  t6600: test --maximal-only and --independent
</content>
</entry>
<entry>
<title>Merge branch 'jt/index-fd-wo-repo-regression-fix-maint'</title>
<updated>2026-04-08T17:20:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-08T17:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe4ab2e698d544a082862a14120efc6b49047382'/>
<id>urn:sha1:fe4ab2e698d544a082862a14120efc6b49047382</id>
<content type='text'>
During Git 2.52 timeframe, we broke streaming computation of object
hash outside a repository, which has been corrected.

* jt/index-fd-wo-repo-regression-fix-maint:
  object-file: avoid ODB transaction when not writing objects
</content>
</entry>
<entry>
<title>Merge branch 'tc/replay-ref'</title>
<updated>2026-04-08T17:19:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-08T17:19:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=37a4780f2c30de9fe0bef533a266c6bca767a50f'/>
<id>urn:sha1:37a4780f2c30de9fe0bef533a266c6bca767a50f</id>
<content type='text'>
The experimental `git replay` command learned the `--ref=&lt;ref&gt;` option
to allow specifying which ref to update, overriding the default behavior.

* tc/replay-ref:
  replay: allow to specify a ref with option --ref
  replay: use stuck form in documentation and help message
  builtin/replay: mark options as not negatable
</content>
</entry>
<entry>
<title>Merge branch 'ng/add-files-to-cache-wo-rename'</title>
<updated>2026-04-08T17:19:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-08T17:19:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d8c553bbed21761a8af3fa40a20518e210e78a0d'/>
<id>urn:sha1:d8c553bbed21761a8af3fa40a20518e210e78a0d</id>
<content type='text'>
add_files_to_cache() used diff_files() to detect only the paths that
are different between the index and the working tree and add them,
which does not need rename detection, which interfered with unnecessary
conflicts.

* ng/add-files-to-cache-wo-rename:
  read-cache: disable renames in add_files_to_cache
</content>
</entry>
<entry>
<title>Merge branch 'ss/t7004-unhide-git-failures'</title>
<updated>2026-04-08T17:19:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-08T17:19:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2e3028a58c1f1fbf08538443fc30a48ac4f6bacf'/>
<id>urn:sha1:2e3028a58c1f1fbf08538443fc30a48ac4f6bacf</id>
<content type='text'>
Test clean-up.

* ss/t7004-unhide-git-failures:
  t7004: replace wc -l with modern test helpers
</content>
</entry>
<entry>
<title>t1800: add &amp;&amp;-chains to test helper functions</title>
<updated>2026-04-08T17:15:47Z</updated>
<author>
<name>Adrian Ratiu</name>
<email>adrian.ratiu@collabora.com</email>
</author>
<published>2026-04-08T16:11:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=373d43e0829d91c61f35f46f6715a23adda7b35d'/>
<id>urn:sha1:373d43e0829d91c61f35f46f6715a23adda7b35d</id>
<content type='text'>
Add the missing &amp;&amp;'s so we properly propagate failures
between commands in the hook helper functions.

Also add a missing mkdir -p arg (found by adding the &amp;&amp;).

Reported-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Adrian Ratiu &lt;adrian.ratiu@collabora.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object-file: avoid ODB transaction when not writing objects</title>
<updated>2026-04-08T00:32:36Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2026-04-07T20:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d8727ff0b621a9729c2de6a3698063b7b3ba2d6'/>
<id>urn:sha1:7d8727ff0b621a9729c2de6a3698063b7b3ba2d6</id>
<content type='text'>
In ce1661f9da (odb: add transaction interface, 2025-09-16), existing
ODB transaction logic is adapted to create a transaction interface
at the ODB layer. The intent here is for the ODB transaction
interface to eventually provide an object source agnostic means to
manage transactions.

An unintended consequence of this change though is that
`object-file.c:index_fd()` may enter the ODB transaction path even
when no object write is requested. In non-repository contexts, this
can result in a NULL dereference and segfault. One such case occurs
when running git-diff(1) outside of a repository with
"core.bigFileThreshold" forcing the streaming path in `index_fd()`:

        $ echo foo &gt;foo
        $ echo bar &gt;bar
        $ git -c core.bigFileThreshold=1 diff -- foo bar

In this scenario, the caller only needs to compute the object ID. Object
hashing does not require an ODB, so starting a transaction is both
unnecessary and invalid.

Fix the bug by avoiding the use of ODB transactions in `index_fd()` when
callers are only interested in computing the object hash.

Reported-by: Luca Stefani &lt;luca.stefani.ge1@gmail.com&gt;
Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
[jc: adjusted to fd13909e (Merge branch 'jt/odb-transaction', 2025-10-02)]
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'th/backfill-auto-detect-sparseness-fix'</title>
<updated>2026-04-07T21:59:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-04-07T21:59:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f1743ad69a492d1ca3773bfdddf7f5ffd278c19b'/>
<id>urn:sha1:f1743ad69a492d1ca3773bfdddf7f5ffd278c19b</id>
<content type='text'>
"git backfill" is capable of auto-detecting a sparsely checked out
working tree, which was broken.

* th/backfill-auto-detect-sparseness-fix:
  backfill: auto-detect sparse-checkout from config
</content>
</entry>
</feed>
