-
Notifications
You must be signed in to change notification settings - Fork 533
Add start_point option for checkout command #597
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
Conversation
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.
Hello @Vasfed! Thank you for this pull request.
I do have some requested changes in my review comments. In addition to those changes, can you also update the README.md to mention that this flag is supported?
Also, the build fails on Windows which you can see here:
https://github.com/ruby-git/ruby-git/actions/runs/3138166086/jobs/5154249814#step:4:41
===============================================================================
Error: test_checkout(TestLib):
Git::GitExecuteError: git "--git-dir=D:/tmp/git_test1664642165171/working/.git" "--work-tree=D:/tmp/git_test1664642165171/working" "-c" "core.quotePath=true" "-c" "color.ui=false" checkout "-b" "test_checkout_b2" "master" 2>&1:error: Your local changes to the following files would be overwritten by checkout:
colon_numbers.txt
example.txt
scott/newfile
scott/text.txt
Please commit your changes or stash them before you switch branches.
Aborting
D:/a/ruby-git/ruby-git/lib/git/lib.rb:1144:in `command'
D:/a/ruby-git/ruby-git/lib/git/lib.rb:783:in `checkout'
D:/a/ruby-git/ruby-git/tests/units/test_lib.rb:86:in `test_checkout'
83:
84: def test_checkout
85: assert(@lib.checkout('test_checkout_b',{:new_branch=>true}))
=> 86: assert(@lib.checkout('test_checkout_b2', {new_branch: true, start_point: 'master'}))
87: assert(@lib.checkout('.'))
88: assert(@lib.checkout('master'))
89: end
===============================================================================
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.
Looks great! Thank you for the PR and the changes.
Co-authored-by: V.Kolesnikov <re.vkolesnikov@gmail.com> Signed-off-by: Vasily Fedoseyev <vasilyfedoseyev@gmail.com>
Fixed tests on windows |
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.
I had missed the build errors during my last review but did notice them before merging.
Thank you for proactively fixing the problem.
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.
Description
This adds support for
start-point
git option when creating a new branch during checkout.Fixes #249