From: Elia Pinto <gitter.spiros@gmail.com>
To: git@vger.kernel.org
Cc: "René Scharfe" <l.s.r@web.de>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Matthew E. Luallen" <m@sph3r3.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Patrick Steinhardt" <ps@pks.im>
Subject: Re: [PATCH 0/2] archive, apply: do not truncate files of 4GiB or more
Date: Thu, 19 Nov 2026 07:57:11 +0100 [thread overview]
Message-ID: <20261119065711.827536-1-gitter.spiros@gmail.com> (raw)
In-Reply-To: <cover.1793524457.git.gitter.spiros@gmail.com>
Hi,
A gentle ping on this two-patch series, which has had no comments so
far. It still applies cleanly to current master (e1ec09b23c) and
merges cleanly with 'seen'.
1/2 (archive) stands on its own. 2/2 (apply) has a question I should
have raised in the cover letter. It fixes the file written to the
working tree, but with --index, and so with "git am", the result still
goes through odb_write_object(), whose length is an "unsigned long"
until "use size_t for a few more object and buffer sizes" [1] lands.
Where "long" has 32 bits while size_t has 64, the blob written to the
index is then still truncated, while the working tree file is now
complete.
I see two ways to handle that:
- pass the size through cast_size_t_to_ulong() in add_index_file(),
so that "git apply --index" dies instead, as 5/5 of the loose object
series [2] does for notes, and drop the cast once [1] is in;
- hold back 2/2 until [1] lands, as Patrick suggested for a similar
case in the pack-receive series [3].
Which one would you prefer?
[1] https://lore.kernel.org/git/cover.1793439137.git.gitter.spiros@gmail.com/
[2] https://lore.kernel.org/git/cover.1795069177.git.gitter.spiros@gmail.com/
[3] https://lore.kernel.org/git/av2pBh7vLj5DVDha@pks.im/
Thanks,
Elia
next prev parent reply other threads:[~2026-11-19 6:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 9:19 [PATCH 0/2] archive, apply: do not truncate files of 4GiB or more Elia Pinto
2026-11-01 9:19 ` [PATCH 1/2] archive: use size_t for the size of archive entries Elia Pinto
2026-11-01 9:19 ` [PATCH 2/2] apply: use size_t for the size of the result written out Elia Pinto
2026-11-19 6:57 ` Elia Pinto [this message]
2026-11-19 9:53 ` [PATCH 0/2] archive, apply: do not truncate files of 4GiB or more Patrick Steinhardt
2026-11-19 17:48 ` Elia Pinto
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=20261119065711.827536-1-gitter.spiros@gmail.com \
--to=gitter.spiros@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=m@sph3r3.com \
--cc=ps@pks.im \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox