<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/technical, branch v2.36.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.36.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.36.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-04-04T17:56:23Z</updated>
<entry>
<title>Merge branch 'rc/fetch-refetch'</title>
<updated>2022-04-04T17:56:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-04-04T17:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f5e8851737282c9dd342032fe9a2d8b10367c9a'/>
<id>urn:sha1:0f5e8851737282c9dd342032fe9a2d8b10367c9a</id>
<content type='text'>
"git fetch --refetch" learned to fetch everything without telling
the other side what we already have, which is useful when you
cannot trust what you have in the local object store.

* rc/fetch-refetch:
  docs: mention --refetch fetch option
  fetch: after refetch, encourage auto gc repacking
  t5615-partial-clone: add test for fetch --refetch
  fetch: add --refetch option
  builtin/fetch-pack: add --refetch option
  fetch-pack: add refetch
  fetch-negotiator: add specific noop initializer
</content>
</entry>
<entry>
<title>docs: mention --refetch fetch option</title>
<updated>2022-03-28T17:25:53Z</updated>
<author>
<name>Robert Coup</name>
<email>robert@coup.net.nz</email>
</author>
<published>2022-03-28T14:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4963d3e41fa454500760fe6f8fb1bab890c1c3eb'/>
<id>urn:sha1:4963d3e41fa454500760fe6f8fb1bab890c1c3eb</id>
<content type='text'>
Document it for partial clones as a means to apply a new filter, and
reference it from the remote.&lt;name&gt;.partialclonefilter config parameter.

Signed-off-by: Robert Coup &lt;robert@coup.net.nz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/partial-bundles'</title>
<updated>2022-03-21T22:14:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-03-21T22:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7391ecd338edcd0317687399c915927c1b4e25dd'/>
<id>urn:sha1:7391ecd338edcd0317687399c915927c1b4e25dd</id>
<content type='text'>
Bundle file format gets extended to allow a partial bundle,
filtered by similar criteria you would give when making a
partial/lazy clone.

* ds/partial-bundles:
  clone: fail gracefully when cloning filtered bundle
  bundle: unbundle promisor packs
  bundle: create filtered bundles
  rev-list: move --filter parsing into revision.c
  bundle: parse filter capability
  list-objects: handle NULL function pointers
  MyFirstObjectWalk: update recommended usage
  list-objects: consolidate traverse_commit_list[_filtered]
  pack-bitmap: drop filter in prepare_bitmap_walk()
  pack-objects: use rev.filter when possible
  revision: put object filter into struct rev_info
  list-objects-filter-options: create copy helper
  index-pack: document and test the --promisor option
</content>
</entry>
<entry>
<title>Merge branch 'ds/commit-graph-gen-v2-fixes'</title>
<updated>2022-03-17T00:53:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-03-17T00:53:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a54cc523ad7736cb5768dc10c1873260738cb4a4'/>
<id>urn:sha1:a54cc523ad7736cb5768dc10c1873260738cb4a4</id>
<content type='text'>
Fixes to the way generation number v2 in the commit-graph files are
(not) handled.

* ds/commit-graph-gen-v2-fixes:
  commit-graph: declare bankruptcy on GDAT chunks
  commit-graph: fix generation number v2 overflow values
  commit-graph: start parsing generation v2 (again)
  commit-graph: fix ordering bug in generation numbers
  t5318: extract helpers to lib-commit-graph.sh
  test-read-graph: include extra post-parse info
</content>
</entry>
<entry>
<title>bundle: parse filter capability</title>
<updated>2022-03-09T18:25:27Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-03-09T16:01:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=105c6f14ad34b417c1e78bc9a8704dcda7b059f2'/>
<id>urn:sha1:105c6f14ad34b417c1e78bc9a8704dcda7b059f2</id>
<content type='text'>
The v3 bundle format has capabilities, allowing newer versions of Git to
create bundles with newer features. Older versions that do not
understand these new capabilities will fail with a helpful warning.

Create a new capability allowing Git to understand that the contained
pack-file is filtered according to some object filter. Typically, this
filter will be "blob:none" for a blobless partial clone.

This change teaches Git to parse this capability, place its value in the
bundle header, and demonstrate this understanding by adding a message to
'git bundle verify'.

Since we will use gently_parse_list_objects_filter() outside of
list-objects-filter-options.c, make it an external method and move its
API documentation to before its declaration.

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: declare bankruptcy on GDAT chunks</title>
<updated>2022-03-07T17:17:03Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-03-02T14:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6dbf4b8172ef9edd50bdf9ca2da4681ba9153f75'/>
<id>urn:sha1:6dbf4b8172ef9edd50bdf9ca2da4681ba9153f75</id>
<content type='text'>
The Generation Data (GDAT) and Generation Data Overflow (GDOV) chunks
store corrected commit date offsets, used for generation number v2.
Recent changes have demonstrated that previous versions of Git were
incorrectly parsing data from these chunks, but might have also been
writing them incorrectly.

I asserted [1] that the previous fixes were sufficient because the known
reasons for incorrectly writing generation number v2 data relied on
parsing the information incorrectly out of a commit-graph file, but the
previous versions of Git were not reading the generation number v2 data.

However, Patrick demonstrated [2] a case where in split commit-graphs
across an alternate boundary (and possibly some other special
conditions) it was possible to have a commit-graph that was generated by
a previous version of Git have incorrect generation number v2 data which
results in errors like the following:

  commit-graph generation for commit &lt;oid&gt; is 1623273624 &lt; 1623273710

[1] https://lore.kernel.org/git/f50e74f0-9ffa-f4f2-4663-269801495ed3@github.com/
[2] https://lore.kernel.org/git/Yh93vOkt2DkrGPh2@ncase/

Clearly, there is something else going on. The situation is not
completely understood, but the errors do not reproduce if the
commit-graphs are all generated by a Git version including these recent
fixes.

If we cannot trust the existing data in the GDAT and GDOV chunks, then
we can alter the format to change the chunk IDs for these chunks. This
causes the new version of Git to silently ignore the older chunks (and
disabling generation number v2 in the process) while writing new
commit-graph files with correct data in the GDA2 and GDO2 chunks.

Update commit-graph-format.txt including a historical note about these
deprecated chunks.

Reported-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Documentation: object_id_len goes up to 31</title>
<updated>2022-02-23T21:36:26Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2022-02-21T18:46:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa48de62ac00bdd634ea5bcd5b1a6bccfa4d9117'/>
<id>urn:sha1:fa48de62ac00bdd634ea5bcd5b1a6bccfa4d9117</id>
<content type='text'>
The value is stored in a 5-bit field, so we can't support more without
a format version upgrade.

Signed-off-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>midx.c: make changing the preferred pack safe</title>
<updated>2022-01-27T20:07:52Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2022-01-25T22:41:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=95e8383bac13490c6980340c3dc2538a789d7833'/>
<id>urn:sha1:95e8383bac13490c6980340c3dc2538a789d7833</id>
<content type='text'>
The previous patch demonstrates a bug where a MIDX's auxiliary object
order can become out of sync with a MIDX bitmap.

This is because of two confounding factors:

  - First, the object order is stored in a file which is named according
    to the multi-pack index's checksum, and the MIDX does not store the
    object order. This means that the object order can change without
    altering the checksum.

  - But the .rev file is moved into place with finalize_object_file(),
    which link(2)'s the file into place instead of renaming it. For us,
    that means that a modified .rev file will not be moved into place if
    MIDX's checksum was unchanged.

This fix is to force the MIDX's checksum to change when the preferred
pack changes but the set of packs contained in the MIDX does not. In
other words, when the object order changes, the MIDX's checksum needs to
change with it (regardless of whether the MIDX is tracking the same or
different packs).

This prevents a race whereby changing the object order (but not the
packs themselves) enables a reader to see the new .rev file with the old
MIDX, or similarly seeing the new bitmap with the old object order.

But why can't we just stop hardlinking the .rev into place instead
adding additional data to the MIDX? Suppose that's what we did. Then
when we go to generate the new bitmap, we'll load the old MIDX bitmap,
along with the MIDX that it references. That's fine, since the new MIDX
isn't moved into place until after the new bitmap is generated. But the
new object order *has* been moved into place. So we'll read the old
bitmaps in the new order when generating the new bitmap file, meaning
that without this secondary change, bitmap generation itself would
become a victim of the race described here.

This can all be prevented by forcing the MIDX's checksum to change when
the object order does. By embedding the entire object order into the
MIDX, we do just that. That is, the MIDX's checksum will change in
response to any perturbation of the underlying object order. In t5326,
this will cause the MIDX's checksum to update (even without changing the
set of packs in the MIDX), preventing the stale read problem.

Note that this makes it safe to continue to link(2) the MIDX .rev file
into place, since it is now impossible to have a .rev file that is
out-of-sync with the MIDX whose checksum it references. (But we will do
away with MIDX .rev files later in this series anyway, so this is
somewhat of a moot point).

In theory, it is possible to store a "fingerprint" of the full object
order here, so long as that fingerprint changes at least as often as the
full object order does. Some possibilities here include storing the
identity of the preferred pack, along with the mtimes of the
non-preferred packs in a consistent order. But storing a limited part of
the information makes it difficult to reason about whether or not there
are gaps between the two that would cause us to get bitten by this bug
again.

Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Reviewed-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Reviewed-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/zdiff3'</title>
<updated>2021-12-15T17:39:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-15T17:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ce498baa3976cf96d3feb4215a486dd47ec2e7b'/>
<id>urn:sha1:4ce498baa3976cf96d3feb4215a486dd47ec2e7b</id>
<content type='text'>
"Zealous diff3" style of merge conflict presentation has been added.

* en/zdiff3:
  update documentation for new zdiff3 conflictStyle
  xdiff: implement a zealous diff3, or "zdiff3"
</content>
</entry>
<entry>
<title>Merge branch 'jt/midx-doc-fix'</title>
<updated>2021-12-10T22:35:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-10T22:35:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cdac0caddd21c9469ca09f9942cb0e9bc3649204'/>
<id>urn:sha1:cdac0caddd21c9469ca09f9942cb0e9bc3649204</id>
<content type='text'>
Docfix.

* jt/midx-doc-fix:
  Doc: no midx and partial clone relation
</content>
</entry>
</feed>
