-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add gps import command #272
Comments
Given the use case presented above, We would also need to support |
Thinking about this some more. I think what this should do is actually find the common ancestor between the specified branch name (or associated branch when patch index is provided) and the currently checked out patch stack. Then it should present the list of patch that will be cherry picked if the user decides to continue by enterying The reason I think this is important is because if the user specifies a branch that wasn't directly based on the currently checked out patch stack, they wouldn't have any idea and it would import possible a large number of patches into the stack. So, I just think it is better to prompt the user to make sure they want to import the patches. |
The idea with the
gps import
command is that you would be able togps import -n <branch-name>
and it would cherry pick the commits from that branch onto the top of your patch stack. Effectively, conceptually importing the patches from a branch into your patch stack. Duplicates would naturally collapse a way.I think this should almost be a proxy command as I want to execute the external
git cherry-pick
command in range made. That way the conflict resolution, etc. is all standard to Git.It won't actually be just a proxy as it has to do some analysis of the Git tree and figure out where the range of patches should start and where it should end so that we can pass those shas onto the
git cherry-pick <start-exclusive-sha>..<end-sha-inclusive>
orgit cherry-pick <start-inclusive-sha>^..<end-sha-inclusive>
.This could be useful for the scenario where you have requested review of a patch and a co-worker has pushed up an additional commit to your rr branch. You likely would want to import the patches from that remote branch. This would import your own patch which would go away as a duplicate, but then it would also import the patch from your co-worker. This would then allow you to iterate on the patch to get a new version and ready and re-request review.
The text was updated successfully, but these errors were encountered: