Fail gracefully when tree commit create fails#1029
Conversation
LibGit2Sharp/TreeDefinition.cs
Outdated
There was a problem hiding this comment.
If builder.Write is returning an ObjectId, I would expect that it exists and this test is not necessary. If builder.Write is claiming that it succeeded, but did not succeed, then we should fix that problem.
Why is it lying?
There was a problem hiding this comment.
builder.Write() does succeed and returns the correct created objectId. Lookup(id) fails because an anti-virus client blocks the read to the created object file.
It is just nicer to fail gracefully here since Lookup just returns null when the object can't be found.
There was a problem hiding this comment.
Hahahaha. Well, it's pretty shocking that an anti-virus software would be so terrible as to put you in this situation.
That said, please don't make assumptions about why a tree wasn't found in the error message. Something more like "unable to write tree" would be more appropriate.
There was a problem hiding this comment.
But thanks for clarifying, indeed I misunderstood and thought the AV software was failing the write not the resultant read.
c69078f to
11c700d
Compare
…ful_with_av Fail gracefully when tree commit create fails
|
🆒 Thanks! |
|
👍 Thanks @aroden-salesforce ! |
|
Published as NuGet pre-release package |
Fix 1028