Skip to content

Support loose 4GB+ objects - #6353

Merged
dscho merged 3 commits into
git-for-windows:mainfrom
dscho:support-loose-4gb-objects
Aug 31, 2026
Merged

Support loose 4GB+ objects#6353
dscho merged 3 commits into
git-for-windows:mainfrom
dscho:support-loose-4gb-objects

Conversation

@dscho

@dscho dscho commented Jul 30, 2026

Copy link
Copy Markdown
Member

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

dscho added 3 commits July 30, 2026 14:19
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>
@dscho dscho self-assigned this Jul 30, 2026
@dscho
dscho requested review from mjcheetham and rimrul July 30, 2026 21:38
Comment thread git-zlib.c
@@ -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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dscho
dscho merged commit 0bd5a69 into git-for-windows:main Aug 31, 2026
60 checks passed
@dscho
dscho deleted the support-loose-4gb-objects branch August 31, 2026 11:21
github-actions Bot pushed a commit to git-for-windows/build-extra that referenced this pull request Aug 31, 2026
It is now [finally
possible](git-for-windows/git#6353) to commit
4GB objects or larger in Git for Windows.

Signed-off-by: gitforwindowshelper[bot] <gitforwindowshelper-bot@users.noreply.github.com>
gitforwindowshelper Bot pushed a commit that referenced this pull request Aug 31, 2026
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
gitforwindowshelper Bot pushed a commit that referenced this pull request Aug 31, 2026
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
gitforwindowshelper Bot pushed a commit that referenced this pull request Aug 31, 2026
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
gitforwindowshelper Bot pushed a commit that referenced this pull request Aug 31, 2026
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
gitforwindowshelper Bot pushed a commit that referenced this pull request Aug 31, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Warning Leads to Silent Data Loss When Committing Large Files (>4GB)

2 participants