[SPIKE] Don't do "clean" check before attempting to check-out PR #1304
Conversation
If the PR can't be checked out, an informative error will be displayed. No need to double guess what can/can't be checked out.
We no longer check to see if a repo is dirty before attempting a checkout.
88f7d2f
to
f54b9e8
Compare
Yes, I think that would be the best solution. |
Here are some related issues:
Initially thought to be related, but maybe this PR is a simpler solution:
Also related:
|
Hey @jcansdale thanks for making these changes! I was testing this and have a few questions.
|
This is a the message from a libgit2sharp exception that gets thrown when it fails to checkout (kind of like when command line Git can't do a checkout).
I think changing files that are included in the PR might be okay, it's changing files that are changed on the target branch that is an issue.
Yup, that is how it's supposed to work! I'll check.
In this case the tests were for a method that has been removed. To test the new functionality, we would need to do integration tests against a real Git repo. This might be a little involved, so I think it would make sense to flesh out exactly how we want it to work before tackling this. It definitely makes sense to add them though. |
ba859ce
to
905f3e1
Compare
This PR was an experiment at addressing #1271. This has since been fixed by the following PRs:
|
NOTE: This PR is intended for experimenting with functionality rather than necessarily merging.
In previous versions, the PR
Checkout
link was only active if the working directory and latest commit where exactly the same. There isn't this restriction when checking out using command line Git.In #1302 this restriction is relaxed a bit to allow untracked files in the staging area (often build artifacts or log files). This PR changes it to behave more like the command line. It will always attempt a checkout and inform the user if it fails.
The
Checkout
command will work and bring that change to the PR branch. There currently isn't any indication that there are local changes when using the PR pane.It doesn't currently give any hints how to fix the conflicts. Maybe we should offer the user a link to the
Team Explorer - Changes
pane?Fixes #1271.