All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elia Pinto <gitter.spiros@gmail.com>
Cc: git@vger.kernel.org,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Simon Richter <Simon.Richter@hogyros.de>,
	 Patrick Steinhardt <ps@pks.im>,
	 Olamide Caleb Bello <belkid98@gmail.com>,
	 Taylor Blau <me@ttaylorr.com>
Subject: Re: [PATCH v2] pack-objects: use size_t for streamed large blobs
Date: Sat, 31 Oct 2026 23:37:30 -0700	[thread overview]
Message-ID: <xmqqse1l12hh.fsf@gitster.g> (raw)
In-Reply-To: <20261031183748.273957-1-gitter.spiros@gmail.com> (Elia Pinto's message of "Sat, 31 Oct 2026 19:37:48 +0100")

Elia Pinto <gitter.spiros@gmail.com> writes:

> In builtin/pack-objects.c, write_no_reuse_object() handles blobs
> exceeding core.bigFileThreshold by writing them in a streaming path. It
> takes the size from st->size (size_t) and assigns it to an "unsigned
> long" variable, which is then written to the pack object header, and
> write_large_blob_data() adds up the compressed length in an "unsigned
> long" as well.
>
> On platforms where "long" is 32 bits, handling a blob of 4GiB or more

On 32-bit boxes, replacing ulong with size_t would not fix anything,
which you already had an discussion.

Please rewrite the above to stress that you are talking about
platforms where "long" is 32 bits but "size_t" is larger than that,
so that the next person do not have to be puzzled by thinking this
is about 32-bit boxes.

  reply	other threads:[~2026-11-01  6:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31 18:04 [PATCH] pack-objects: use size_t for streamed large blobs Elia Pinto
2026-10-31 18:37 ` [PATCH v2] " Elia Pinto
2026-11-01  6:37   ` Junio C Hamano [this message]
2026-11-01  7:29   ` [PATCH v3] " Elia Pinto
2026-11-03 22:14     ` Junio C Hamano

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=xmqqse1l12hh.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=Simon.Richter@hogyros.de \
    --cc=belkid98@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitter.spiros@gmail.com \
    --cc=me@ttaylorr.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 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.