-
Notifications
You must be signed in to change notification settings - Fork 11
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
git cherry-menu: allow blacklist edit if patch-id changed after cherry-pick #4
base: master
Are you sure you want to change the base?
Conversation
…y-pick Normally we would only blacklist the upstream branch we're working on if patch-id changed after a successful cherry-pick. Thus we can still port the patch to other branch in the future.
"git show --notes" will return 141 when file contents are very long and you enter 'q' command. safe_run will fail because of it and will give the following error: git show --notes $sha1 failed! Aborting. Hence we couldn't use safe_run for this command.
safe_run git notes add -m"skip: all | ||
if ! has_note "$sha1"; then | ||
safe_run git notes append -m'skip: ??? | ||
XXX (Please change the "???" above to the name of the upstream branch |
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.
Yeah, finding the upstream branch name is the difficult bit :-( I don't know how to do it without an interface redesign.
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.
An interface redesign is much better. We can use git cherry-menu like this:
git icing -v3 upstreaming_branch master_branch | git cherry-menu upstreaming_branch
or redirect the stdin from file:
git icing -v3 upstreaming_branch master_branch >porting_list; git cherry-menu upstreaming_branch <porting_list
The latter case also gives us the ability to modify the list for automatically blacklisting all the commits in it. For example, we can add --auto-blacklist option. Then git cherry-menu can blacklist all the commits in porting_list automatically.
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.
Piping the cherry-pick
"TODO list" into git cherry-menu
is what I originally wanted to do, but it's not possible like that, because git cherry-menu
requires STDIN to be the tty so that it can work interactively. If you can figure out a way to make it work then I'd welcome the pull request!
Normally we would only blacklist the upstream branch we're working on if
patch-id changed after a successful cherry-pick. Thus we can still port
the patch to other branch in the future.
This is an initial attempt. Please help to review and give feedback.