Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Git to v2.29.0 #1694

Merged
merged 5 commits into from
Oct 20, 2020
Merged

Conversation

derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented Oct 7, 2020

See microsoft/git#295.

Scalar already merged these changes to the PackfileMaintenanceStepTests.

The other changes were reviewed privately.

derrickstolee added a commit that referenced this pull request Oct 15, 2020
…issue

See #1696 for the tracking issue.

This PR intends to get our functional tests green again so we can have some confidence in the Git 2.29.0 update in #1694.
@derrickstolee derrickstolee force-pushed the vfs-2.29.0 branch 3 times, most recently from 0ebeb56 to 973e4d8 Compare October 20, 2020 00:06
Signed-off-by: Derrick Stolee <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
@derrickstolee derrickstolee changed the title [PR Build] Update Git to v2.29.0 Update Git to v2.29.0 Oct 20, 2020
@derrickstolee derrickstolee marked this pull request as ready for review October 20, 2020 01:36
@derrickstolee derrickstolee requested review from mjcheetham, jeffhollan and jeffhostetler and removed request for jeffhollan October 20, 2020 01:36
@derrickstolee derrickstolee merged commit 7dab942 into microsoft:master Oct 20, 2020
derrickstolee added a commit that referenced this pull request Oct 20, 2020
Here are the changes since our last release:

* #1689: Make delete docs more verbose
* #1697: Fix functional tests to skip around ProjFS issue
* #1694: Update Git to v2.29.0
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.

3 participants