Conversation
Co-authored-by: i80487 <222595226+i80487@users.noreply.github.com>
Co-authored-by: i80487 <222595226+i80487@users.noreply.github.com>
This branch has not been deployed
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.
Note: This PR was created as part of a test of GitHub Copilot agents. I believe the proposed changes are relevant and consistent, but I don’t have enough experience with the git-for-windows source code to evaluate them properly.
I was unable to verify that these changes work correctly using the test script t/t5005-archive-large-files.sh, because it appears that the GIT_TEST_LONG=true option and the SIZE_T_IS_64BIT prerequisite must be enabled, and I don’t know how to configure this in GitHub CI/CD.
Feel free to modify, defer, or reject this PR.
Details:
git archivestill carriedunsigned longsize plumbing in bothzipandtarpaths, which truncates 4GiB+ entry sizes on LLP64 Windows before Zip64/PAX logic can trigger. As a result, large entries could be archived with silently wrapped sizes even though the surrounding format support already handled 64-bit lengths.Common archive callback plumbing
write_archive_entry_fn_tand thewrite_archive_entries()call chain fromunsigned longtosize_t.Zip backend: make Zip64 decisions from real sizes
size_t.uint32_t; do not conflate checksum width with payload size width.size_t-sized buffers.Tar backend: keep tar/PAX consistent with widened sizes
size_t.size_tconsistently.Regression coverage
SIZE_T_IS_64BITarchive test that creates a real 4GiB file, commits it, archives it, and verifies the reported entry size in both zip and tar output.t/meson.build.