Support loose 4GB+ objects - #6353
Open
dscho wants to merge 3 commits into
Open
Conversation
This is yet another set of `unsigned long` declarations that should have been `size_t` ones. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
... and yet another round of `unsigned long` -> `size_t` transmogrifications. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
I should have added this test as soon as git-for-windows#6012 was opened. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
mjcheetham
reviewed
Jul 30, 2026
| @@ -33,7 +33,7 @@ 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) | |||
Member
There was a problem hiding this comment.
This macro and comment makes me wonder if we're not using the ULONG_MAX_VALUE to check or gate something which now should be checking against SIZE_MAX?
Member
Author
There was a problem hiding this comment.
No, this macro (and the surrounding uLong code) are about zlib's API using the unsigned long data type instead of the size_t one... So we have to work around that in Git's code. This macro is correct, and needed as-is, unfortunately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I merged the massive amount of work in #6289, I thought that that was the end of it. But simply staging and unpacking loose blobs that are 4GB or larger still does not work. This PR addresses that.
This fixes #6012