From: Junio C Hamano <gitster@pobox.com>
To: Derrick Stolee <stolee@gmail.com>
Cc: Patrick Steinhardt <ps@pks.im>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH 1/3] test-tool: add pack-deltas helper
Date: Mon, 28 Apr 2025 13:35:25 -0700 [thread overview]
Message-ID: <xmqqwmb4ausy.fsf@gitster.g> (raw)
In-Reply-To: <6df25bf2-6df1-4c3a-9061-e3297dec38ab@gmail.com> (Derrick Stolee's message of "Mon, 28 Apr 2025 14:59:22 -0400")
Derrick Stolee <stolee@gmail.com> writes:
> This makes sense as a feature, except that we need to write the number
> of objects present in a packfile in its header. If we wanted to avoid
> the argument, then we'd need to load the data into a list before
> starting to write the packfile. By taking the count in advance, the
> implementation is simpler.
Perhaps, but in the production code we already seek back and update
the header after writing a packfile with fixup_pack_header_footer(),
so which shoulnd't be too much work conceptually. You earlier said
something about faster development cycles; not having to figure out
how to seek back and fix the header does help faster development of
this helper ;-).
>> One thing it lets
>> us do to have this as a separate number is to create an invalid pack
>> stream where the header gives a wrong number, and as a test tool,
>> that may trump the convenience of not having to give the number
>> explicitly.
> But also, this allows generating bad packfiles which is a bonus.
> A very good point.
If this were an end-user facing program, we would most likely let it
count but let the count be overridden by the command line argument.
But until then, as I said, I am fine to just declare that it is just
a test helper ;-)
Thanks.
next prev parent reply other threads:[~2025-04-28 20:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwmb4ausy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.