Add start_point option for checkout command#597
Merged
Conversation
jcouball
requested changes
Oct 1, 2022
Member
There was a problem hiding this comment.
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
===============================================================================
jcouball
previously approved these changes
Oct 5, 2022
jcouball
left a comment
Member
There was a problem hiding this comment.
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>
Contributor
Author
|
Fixed tests on windows |
jcouball
approved these changes
Oct 5, 2022
jcouball
left a comment
Member
There was a problem hiding this comment.
I had missed the build errors during my last review but did notice them before merging.
Thank you for proactively fixing the problem.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.
Description
This adds support for
start-pointgit option when creating a new branch during checkout.Fixes #249