-
Notifications
You must be signed in to change notification settings - Fork 787
git: checkout.validate should set to branch only if both branch and hash are empty #1525
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
base: main
Are you sure you want to change the base?
Conversation
…ash are empty add validation usecase for Force and keep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GaikwadPratik thanks for working on this. 🙇
@GaikwadPratik can you please take a look at the failing tests? |
Hi @pjbgf , applied the suggestions, can you please trigger another pipeline? Is there a way to run |
@GaikwadPratik I generally run |
Can we please update the documentation? Also any idea why pipeline is failing even though my code doesn't touch those tests? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this fails on my codespace too.
…tions tests by simplifying them
@pjbgf , okay my changes were breaking one of the test in ![]() |
add validation usecase for Force and keep.
This would avoid the error condition where if Hash is provided on CheckoutOptions but NOT branch and validate is called since per documentation:
// Branch to be checked out, if Branch and Hash are empty is set to master.
Branch plumbing.ReferenceName