Skip to content

Update libgit2 binaries to 4e1f517 #592

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

Closed
wants to merge 2 commits into from
Closed

Conversation

nulltoken
Copy link
Member

No description provided.

@nulltoken
Copy link
Member Author

Most of the failing tests originates from @carlosmn's libgit2/libgit2#1920. I'll update the code to cope with the changes.

However, the following one may require some additional changes at the libgit2 level. @jamill What's your opinion. How should we properly deal with this?

Test 'LibGit2Sharp.Tests.CheckoutFixture.CanCancelCheckoutThroughNotifyCallback' failed: Assert.Throws() Failure
Expected: LibGit2Sharp.UserCancelledException
Actual:   LibGit2Sharp.LibGit2SharpException: An error was raised by libgit2. Category = 26 (Error).
          git_checkout notification callback returned -1
    Core\Ensure.cs(108,0): at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
    Core\Ensure.cs(126,0): at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result)
    Core\Proxy.cs(271,0): at LibGit2Sharp.Core.Proxy.git_checkout_tree(RepositorySafeHandle repo, ObjectId treeId, GitCheckoutOpts& opts)
    Repository.cs(790,0): at LibGit2Sharp.Repository.CheckoutTree(Tree tree, IList`1 paths, CheckoutOptions opts)
    Repository.cs(746,0): at LibGit2Sharp.Repository.Checkout(Tree tree, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions, String headTarget, String refLogHeadSpec, Boolean writeReflogEntry)
    Repository.cs(682,0): at LibGit2Sharp.Repository.Checkout(Branch branch, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotificationOptions)
    Repository.cs(634,0): at LibGit2Sharp.Repository.Checkout(String committishOrBranchSpec, CheckoutModifiers checkoutModifiers, CheckoutProgressHandler onCheckoutProgress, CheckoutNotificationOptions checkoutNotifications)
    CheckoutFixture.cs(342,0): at LibGit2Sharp.Tests.CheckoutFixture.<>c__DisplayClassf.<CanCancelCheckoutThroughNotifyCallback>b__c()
    at Xunit.Record.Exception(ThrowsDelegateWithReturn code)

@jamill
Copy link
Member

jamill commented Dec 23, 2013

I would just update the line in ConvertResultToCancelFlag from:

return result ? 0 : -1;

to:

return result ? 0 : (int)GitErrorCode.User;

This is based off of a little older libgit2 commit, but here are some of the reactions I made for a libgit2 update:

jamill@d150b06

@nulltoken
Copy link
Member Author

@jamill Duh... You're right! I forgot this was only a boolean. 😊

@nulltoken nulltoken added this to the UnmergedOrDoNotRequireAFix milestone Mar 14, 2014
@nulltoken nulltoken closed this Mar 14, 2014
@nulltoken nulltoken deleted the ntk/topic/bump_libgit2 branch April 1, 2014 21:36
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.

2 participants