git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] archive, apply: do not truncate files of 4GiB or more

From
Elia Pinto <gitter.spiros@gmail.com>
Date
Nov 19, 2026, 06:57 UTC
Message-ID
<20261119065711.827536-1-gitter.spiros@gmail.com>
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

Previous: Elia PintoNext: Patrick Steinhardt
Message 4 of 6 in “archive, apply: do not truncate files of 4GiB or more”
  1. 0/2 archive, apply: do not truncate files of 4GiB or moreElia Pinto, Nov 1, 2026
  2. 1/2 archive: use size_t for the size of archive entriesElia Pinto, Nov 1, 2026
  3. 2/2 apply: use size_t for the size of the result written outElia Pinto, Nov 1, 2026
  4. Elia PintoNov 19, 2026
  5. Patrick SteinhardtNov 19, 2026
  6. Elia PintoNov 19, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.