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

[Improvement] Do complete checkout when updating local branch fails #542

Closed
GeertvanHorrik opened this issue Jul 28, 2015 · 3 comments
Closed

Comments

@GeertvanHorrik
Copy link
Contributor

Today I had this:

INFO [07/28/15 11:14:11:99] Updating branch 'release/1.2.0'
ERROR [07/28/15 11:14:12:11] An unexpected error occurred:
LibGit2Sharp.MergeConflictException: 8 conflicts prevent checkout
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_checkout_tree(RepositorySafeHandle repo, ObjectId treeId, GitCheckoutOpts& opts)
at LibGit2Sharp.Repository.CheckoutTree(Tree tree, IList`1 paths, IConvertableToGitCheckoutOpts opts)
at LibGit2Sharp.Repository.Checkout(Tree tree, CheckoutOptions checkoutOptions, String headTarget, String refLogHeadSpec, Signature signature)
at LibGit2Sharp.Repository.Checkout(Branch branch, CheckoutOptions options, Signature signature)
at LibGit2Sharp.Branch.Checkout()

When trying to get a version with remote repositories. There are a few things that are wrong here:

  1. We probably need to "lock" the directory (what if 2 builds (release and check-in build) are running at the same time?)
  2. We need to do a full clone if somehow this fails
@GeertvanHorrik
Copy link
Contributor Author

Preferrably, I would like to fix this in GitTools.Core and start using that inside GitVersion.

@JakeGinnivan
Copy link
Contributor

We need to do a full clone if somehow this fails

I think the locking should be enough, any other exceptions are bugs in branch normalisation and we need to fix rather than masking the problem.

@JakeGinnivan
Copy link
Contributor

Created #599 to track the locking

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

No branches or pull requests

2 participants