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

Re: [PATCH 0/2] grep, diff: do not silently truncate sizes of 4GiB or more

From
Elia Pinto <gitter.spiros@gmail.com>
Date
Nov 19, 2026, 06:53 UTC
Message-ID
<20261119065307.826988-1-gitter.spiros@gmail.com>
In-Reply-To
<cover.1793521916.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'.

The question I would most like an opinion on is the approach of 2/2. Where "long" has 32 bits while size_t has 64, it makes "git diff" die on a worktree file, textconv output and the like of 4GiB or more, as it already does on the blob side, instead of silently diffing a prefix. Making diff work for such files means widening diff_filespec.size, which touches much more code. Is dying acceptable as a first step, or would you rather have the widening instead?

Thanks, Elia

Previous: Elia Pinto
Message 4 of 4 in “grep, diff: do not silently truncate sizes of 4GiB or more”
  1. 0/2 grep, diff: do not silently truncate sizes of 4GiB or moreElia Pinto, Nov 1, 2026
  2. 1/2 grep: use size_t for the size of buffers to searchElia Pinto, Nov 1, 2026
  3. 2/2 diff: die instead of truncating sizes of 4GiB or moreElia Pinto, Nov 1, 2026
  4. 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.