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

Simplify dealing with missing git objects #1909

Merged

Conversation

jairbubbles
Copy link
Contributor

@jairbubbles jairbubbles commented Sep 12, 2021

  • Add IsMissing on GitObject to know if a git objects is missing without any exception involved
  • Make some methods on Blob and Tree explicitly throw a NotFoundException (rather than a NullReferenceException later on when accessing the null handle)

@jairbubbles

This comment has been minimized.

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2021

Codecov Report

Merging #1909 (c423ad1) into master (6329bea) will decrease coverage by 0.03%.
The diff coverage is 61.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1909      +/-   ##
==========================================
- Coverage   84.80%   84.76%   -0.04%     
==========================================
  Files         231      231              
  Lines        9120     9130      +10     
==========================================
+ Hits         7734     7739       +5     
- Misses       1386     1391       +5     
Impacted Files Coverage Δ
LibGit2Sharp/Core/Proxy.cs 93.85% <55.55%> (-0.28%) ⬇️
LibGit2Sharp/Blob.cs 95.45% <75.00%> (-4.55%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6329bea...c423ad1. Read the comment docs.

@jairbubbles jairbubbles force-pushed the support-for-blobless-repositories branch 2 times, most recently from bcf3892 to 8c8af89 Compare October 3, 2021 17:23
@jairbubbles jairbubbles changed the title Support for blobless repositories Simplify dealing with missing git objects Oct 3, 2021
@jairbubbles jairbubbles force-pushed the support-for-blobless-repositories branch from 8c8af89 to a06c37d Compare October 3, 2021 18:12
@jairbubbles jairbubbles marked this pull request as ready for review October 3, 2021 18:19
@jairbubbles jairbubbles force-pushed the support-for-blobless-repositories branch 3 times, most recently from 8cf1d35 to 243ba03 Compare October 3, 2021 19:02
@jairbubbles jairbubbles force-pushed the support-for-blobless-repositories branch from 243ba03 to b05a00f Compare November 22, 2021 10:36
@bording bording merged commit e00da45 into libgit2:master Dec 29, 2021
@bording
Copy link
Member

bording commented Jan 4, 2022

Thanks for the PR! I've pushed 0.27.0-preview-0175 to nuget.org, which includes these changes.

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