git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix REF_DELTA chain bug in 'git index-pack'
@ 2025-04-23 17:40 Derrick Stolee via GitGitGadget
  2025-04-23 17:40 ` [PATCH 1/3] test-tool: add pack-deltas helper Derrick Stolee via GitGitGadget
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: Derrick Stolee via GitGitGadget @ 2025-04-23 17:40 UTC (permalink / raw)
  To: git; +Cc: gitster, peff, Derrick Stolee

When fetching content from a remote, 'git index-pack' processes the packfile
content, storing a packfile appropriate for on-disk storage and a pack-index
helping to perform random-access into that packfile. To help with
compression, the packfile sent over the wire can use REF_DELTAs in addition
to OFS_DELTAs to refer to objects that are already known to exist in the
client's repository. REF_DELTAs can also refer to objects within the
packfile, though this is not typically done.

Because this inter-pack REF_DELTA is not a typical data shape, a latent bug
has been waiting that causes 'git index-pack' to die() even on legitimate
packfile content that it could resolve.

This series resolves this problem while also creating a test helper for
constructing packfiles with specific objects represented in specific types
of deltas and in a given order. This should make it easier to create test
cases like this in the future instead of updating t/lib-pack.sh through
other means.

Thanks, -Stolee

Derrick Stolee (3):
  test-tool: add pack-deltas helper
  t5309: create failing test for 'git index-pack'
  index-pack: allow revisiting REF_DELTA chains

 Makefile                     |   1 +
 builtin/index-pack.c         |  58 ++++++++-------
 t/helper/meson.build         |   1 +
 t/helper/test-pack-deltas.c  | 140 +++++++++++++++++++++++++++++++++++
 t/helper/test-tool.c         |   1 +
 t/helper/test-tool.h         |   1 +
 t/t5309-pack-delta-cycles.sh |  36 ++++++++-
 7 files changed, 210 insertions(+), 28 deletions(-)
 create mode 100644 t/helper/test-pack-deltas.c


base-commit: 4bbb303af69990ccd05fe3a2eb58a1ce036f8220
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1906%2Fderrickstolee%2Findex-pack-ref-deltas-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1906/derrickstolee/index-pack-ref-deltas-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1906
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2025-05-07 13:47 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 17:40 [PATCH 0/3] Fix REF_DELTA chain bug in 'git index-pack' Derrick Stolee via GitGitGadget
2025-04-23 17:40 ` [PATCH 1/3] test-tool: add pack-deltas helper Derrick Stolee via GitGitGadget
2025-04-23 19:26   ` Junio C Hamano
2025-04-23 19:32     ` Derrick Stolee
2025-04-24 19:41   ` Junio C Hamano
2025-04-24 20:06     ` Derrick Stolee
2025-04-24 20:56       ` Junio C Hamano
2025-04-25  4:34   ` Patrick Steinhardt
2025-04-25  9:34     ` Johannes Schindelin
2025-04-25  9:45       ` Patrick Steinhardt
2025-04-25  9:51         ` Johannes Schindelin
2025-04-25 16:27         ` Junio C Hamano
2025-04-28 15:22           ` Derrick Stolee
2025-04-28 16:37             ` Junio C Hamano
2025-04-28 18:59               ` Derrick Stolee
2025-04-28 20:35                 ` Junio C Hamano
2025-04-23 17:40 ` [PATCH 2/3] t5309: create failing test for 'git index-pack' Derrick Stolee via GitGitGadget
2025-04-23 19:37   ` Junio C Hamano
2025-04-23 17:40 ` [PATCH 3/3] index-pack: allow revisiting REF_DELTA chains Derrick Stolee via GitGitGadget
2025-04-24 21:41   ` Junio C Hamano
2025-04-25  3:49     ` Derrick Stolee
2025-04-28 20:24 ` [PATCH v2 0/3] Fix REF_DELTA chain bug in 'git index-pack' Derrick Stolee via GitGitGadget
2025-04-28 20:24   ` [PATCH v2 1/3] test-tool: add pack-deltas helper Derrick Stolee via GitGitGadget
2025-04-28 20:24   ` [PATCH v2 2/3] t5309: create failing test for 'git index-pack' Derrick Stolee via GitGitGadget
2025-04-28 20:24   ` [PATCH v2 3/3] index-pack: allow revisiting REF_DELTA chains Derrick Stolee via GitGitGadget
2025-05-07  2:08     ` Taylor Blau
2025-05-07 13:47       ` Derrick Stolee
2025-04-28 22:40   ` [PATCH v2 0/3] Fix REF_DELTA chain bug in 'git index-pack' Junio C Hamano
2025-04-29  5:33     ` Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).