git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>,
	 Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v3 00/13] Next size_t stop: pack-objects/delta
Date: Thu, 13 Aug 2026 09:49:46 -0700	[thread overview]
Message-ID: <xmqqbjb6t179.fsf@gitster.g> (raw)
In-Reply-To: <pull.2175.v3.git.1786632952.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Thu, 13 Aug 2026 14:55:38 +0000")

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> This patch series continues the effort to stop using unsigned long where
> size_t should have been used in the first place. This makes a difference on
> 64-bit Windows, where unsigned long is 32-bit.
>
> With these fixes, the pack-objects machinery works as intended on 64-bit
> Windows (and any other 64-bit platform where unsigned long isn't 64-bit).
>
> Changes since v2:
>
>  * Now zlib_cap_buf() is also widened in this patch series (I had left this
>    for a later one, originally).
>  * The unpack_object_header_buffer() function is now also widened in this
>    here patch series.

Both changes relative to v1 are just as expected.  Nicely corrected.

>   7:  ca928b4579 !  7:  e4528f9034 packfile, git-zlib: widen `use_pack()` and zstream avail fields to `size_t`
>      @@ builtin/pack-objects.c: size_t oe_get_size_slow(struct packing_data *pack,
>        	if (e->type_ != OBJ_OFS_DELTA && e->type_ != OBJ_REF_DELTA) {
>        		size_t sz;
>       
>      + ## git-zlib.c ##
>      +@@ git-zlib.c: static const char *zerr_to_string(int status)
>      + 
>      + /* uLong is 32-bit on Windows, even on 64-bit systems */
>      + #define ULONG_MAX_VALUE maximum_unsigned_value_of_type(uLong)
>      +-static inline uInt zlib_buf_cap(unsigned long len)
>      ++static inline uInt zlib_buf_cap(size_t len)
>      + {
>      + 	return (ZLIB_BUF_MAX < len) ? ZLIB_BUF_MAX : len;
>      + }
>      +
>        ## git-zlib.h ##
>       @@
>        
>   -:  ---------- > 13:  bc4a58336a packfile: widen `unpack_object_header_buffer()` to `size_t`


IIRC, there are some topics in flight that have their own local
workaround for some members this series fixes the type from ulong to
size_t and they may need to be adjusted but in a good way ;-).

Thanks.  Will replace.

      parent reply	other threads:[~2026-08-13 16:49 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 16:49 [PATCH 00/12] Next size_t stop: pack-objects/delta Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 01/12] diff-delta: widen `struct delta_index`' size fields to `size_t` Johannes Schindelin via GitGitGadget
2026-08-05  9:22   ` Patrick Steinhardt
2026-08-05 13:51     ` Johannes Schindelin
2026-07-09 16:49 ` [PATCH 02/12] delta: widen `create_delta_index()` parameter " Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 03/12] pack-objects: widen delta-cache accounting " Johannes Schindelin via GitGitGadget
2026-08-05  9:23   ` Patrick Steinhardt
2026-08-05 13:52     ` Johannes Schindelin
2026-07-09 16:49 ` [PATCH 04/12] pack-objects: widen `free_unpacked()` return " Johannes Schindelin via GitGitGadget
2026-08-05  9:23   ` Patrick Steinhardt
2026-07-09 16:49 ` [PATCH 05/12] pack-objects: widen `mem_usage` and `try_delta()`'s out-param " Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 06/12] delta: widen `create_delta()` and `diff_delta()` " Johannes Schindelin via GitGitGadget
2026-08-05  9:23   ` Patrick Steinhardt
2026-07-09 16:49 ` [PATCH 07/12] packfile, git-zlib: widen `use_pack()` and zstream avail fields " Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 08/12] archive-zip: widen `zlib_deflate_raw()`'s maxsize local " Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 09/12] diff: widen `deflate_it()`'s bound local from int " Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 10/12] http-push: widen `start_put()`'s size local from `ssize_t` " Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 11/12] t/helper/test-pack-deltas: widen `do_compress()`'s maxsize local " Johannes Schindelin via GitGitGadget
2026-07-09 16:49 ` [PATCH 12/12] git-zlib: widen `git_deflate_bound()` " Johannes Schindelin via GitGitGadget
2026-08-05  9:23   ` Patrick Steinhardt
2026-08-05 13:58     ` Johannes Schindelin
2026-08-05 16:14 ` [PATCH v2 00/12] Next size_t stop: pack-objects/delta Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 01/12] diff-delta: widen `struct delta_index`' size fields to `size_t` Johannes Schindelin via GitGitGadget
2026-08-06  6:15     ` Patrick Steinhardt
2026-08-05 16:14   ` [PATCH v2 02/12] delta: widen `create_delta_index()` parameter " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 03/12] pack-objects: widen delta-cache accounting " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 04/12] pack-objects: widen `free_unpacked()` return " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 05/12] pack-objects: widen `mem_usage` and `try_delta()`'s out-param " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 06/12] delta: widen `create_delta()` and `diff_delta()` " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 07/12] packfile, git-zlib: widen `use_pack()` and zstream avail fields " Johannes Schindelin via GitGitGadget
2026-08-07 21:41     ` Junio C Hamano
2026-08-07 22:06     ` Junio C Hamano
2026-08-05 16:14   ` [PATCH v2 08/12] archive-zip: widen `zlib_deflate_raw()`'s maxsize local " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 09/12] diff: widen `deflate_it()`'s bound local from int " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 10/12] http-push: widen `start_put()`'s size local from `ssize_t` " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 11/12] t/helper/test-pack-deltas: widen `do_compress()`'s maxsize local " Johannes Schindelin via GitGitGadget
2026-08-05 16:14   ` [PATCH v2 12/12] git-zlib: widen `git_deflate_bound()` " Johannes Schindelin via GitGitGadget
2026-08-06  6:15   ` [PATCH v2 00/12] Next size_t stop: pack-objects/delta Patrick Steinhardt
2026-08-06 17:30     ` Junio C Hamano
2026-08-10 23:15     ` Junio C Hamano
2026-08-13 14:55 ` [PATCH v3 00/13] " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 01/13] diff-delta: widen `struct delta_index`' size fields to `size_t` Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 02/13] delta: widen `create_delta_index()` parameter " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 03/13] pack-objects: widen delta-cache accounting " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 04/13] pack-objects: widen `free_unpacked()` return " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 05/13] pack-objects: widen `mem_usage` and `try_delta()`'s out-param " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 06/13] delta: widen `create_delta()` and `diff_delta()` " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 07/13] packfile, git-zlib: widen `use_pack()` and zstream avail fields " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 08/13] archive-zip: widen `zlib_deflate_raw()`'s maxsize local " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 09/13] diff: widen `deflate_it()`'s bound local from int " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 10/13] http-push: widen `start_put()`'s size local from `ssize_t` " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 11/13] t/helper/test-pack-deltas: widen `do_compress()`'s maxsize local " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 12/13] git-zlib: widen `git_deflate_bound()` " Johannes Schindelin via GitGitGadget
2026-08-13 14:55   ` [PATCH v3 13/13] packfile: widen `unpack_object_header_buffer()` " Johannes Schindelin via GitGitGadget
2026-08-13 16:49   ` Junio C Hamano [this message]

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=xmqqbjb6t179.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --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;
as well as URLs for NNTP newsgroup(s).