Update Git to v2.29.0#1694
Merged
derrickstolee merged 5 commits intomicrosoft:masterfrom Oct 20, 2020
Merged
Conversation
This was referenced Oct 7, 2020
0ebeb56 to
973e4d8
Compare
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
The last condition of this test no longer applies because Git will repack files in a different way than it used to. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
We will start hashing loose objects downloaded from the remotes, but we need to include a package (SharpZipLib) that can handle the headers included in the ZLib compression used by Git. .NET's default decompression algorithm cannot handle those optional headers, unfortunately. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
After we write the data to disk, check the file that it matches the correct hash before moving it into place. If the hash is wrong, then include details about where the data is stored for reference. This can be marked as optional to make existing unit tests work, but the logic is covered by a new set of unit tests. Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
The loose object download needs to verify the objects being sent across
the wire before moving them to their "real" locations in the object
directory. The previous implementation wrote them to disk then read from
that file to hash the contents.
Instead, create a new "SideChannelStream" that injects between the
responseStream and the inflater, but sends all of the data that is read
out to the filestream. Here is a diagram of the stream sequence:
responseStream -> sideChannelStream -> inflateStream -> hashingStream
\ |
\ \|/
tempFileStream devNull
By copying all data from the hashingStream into devNull, we ensure that
the responseStream is drained and written to the tempFileStream while
simultaneously inflating and hashing the object contents. We then
amortize this computation during the window that we are downloading data
over the network, minimizing the potential performance impact.
Helped-by: Matthew Cheetham <mjcheetham@github.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
973e4d8 to
ded306b
Compare
dscho
approved these changes
Oct 20, 2020
jeffhostetler
approved these changes
Oct 20, 2020
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.
See microsoft/git#295.
Scalar already merged these changes to the PackfileMaintenanceStepTests.
The other changes were reviewed privately.