-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Use "git cherry-pick" for implementing copy/paste of commits #4443
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
Open
stefanhaller
wants to merge
4
commits into
show-revert-and-cherry-pick-todos
Choose a base branch
from
implement-cherry-picking-with-git-cherry-pick
base: show-revert-and-cherry-pick-todos
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Use "git cherry-pick" for implementing copy/paste of commits #4443
stefanhaller
wants to merge
4
commits into
show-revert-and-cherry-pick-todos
from
implement-cherry-picking-with-git-cherry-pick
Conversation
This file contains 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
cd2e83f
to
a8eefbc
Compare
d81bb8b
to
e30f7b4
Compare
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
a8eefbc
to
d88dd37
Compare
e30f7b4
to
3ff8f5c
Compare
d88dd37
to
57d7c9e
Compare
3ff8f5c
to
fb458bb
Compare
…ing new ones Previously we would create new Commit objects to store in the CherryPicking mode which only contained a name and hash, all other fields were unset. I'm not sure why we did this; it's easier to just reference the original commits. Later on this branch we will need this because we need to determine whether a copied commit was a merge commit (by looking at its Parents field).
We do this because - it's closer to what you would do on the command line - it simplifies the code a bit - it will allow us to support cherry-picking merge commits.
Now that we use git cherry-pick to implement it, there's no reason not to.
57d7c9e
to
c1143a2
Compare
fb458bb
to
417080e
Compare
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.
This is part three of a four part series of PRs that improve the cherry-pick and revert experience.
With this PR we reimplement copy/paste of commits to use
git cherry-pick
under the hood. We do this becauseFixes #1374
Fixes #3317
go generate ./...
)