[rebase] menu item and dialog to start rebase operation#6961
[rebase] menu item and dialog to start rebase operation#6961niik merged 26 commits intodevelopmentfrom
Conversation
585b588 to
3684e0e
Compare
| ? 'Rebase Current Branch…' | ||
| : 'R&ebase current branch…', | ||
| id: 'rebase-branch', | ||
| accelerator: 'CmdOrCtrl+Shift+E', |
There was a problem hiding this comment.
I settled on E here because R or B are already assigned to other shortcuts
|
|
||
| log.info(`[rebase] starting rebase for ${beforeSha}`) | ||
|
|
||
| // TODO: this can happen very quickly for a trivial rebase or an OS with |
There was a problem hiding this comment.
Going to keep this around because I have #6962 to tackle 🔜
| return RebaseResult.CompletedWithoutError | ||
| } | ||
|
|
||
| if (rebaseEncounteredConflictsRe.test(result.stdout)) { |
There was a problem hiding this comment.
I bumped dugite to the latest version to replace this regex inspection with proper error codes for the known rebase problem scenarios: desktop/dugite#306
|
Tested the new menu option/shortcut as of 76d48b9 and found no issues.
|
I don't think it's worth actively trying to block this case unless there's downsides to this. The second rebase would be a clean rebase (because the user resolved any conflicts in the first rebase). |
|
If a merge conflict is in progress and is currently in manual resolution mode (banner present), then the ( |
👍 you can currently try merging a branch while also dealing with merge conflicts. I'll spin this out to an issue to track tomorrow. |
f113389 to
29b5d2e
Compare
|
I've opened #7017 to audit the menu items and figure out which should be enabled when dealing with conflicts. |
|
Marking this as |
25bdc88 to
09628d1
Compare
Co-Authored-By: shiftkey <brendan@github.com>
| // createUniqueId handles static strings fine, so in the case of receiving | ||
| // a JSX element for the title we can just pass in a fixed value rather | ||
| // than trying to generate a string from an arbitrary element | ||
| const id = typeof this.props.title === 'string' ? this.props.title : '???' |
There was a problem hiding this comment.
Not gonna hold up this from landing because of this but ??? stands out to me here. I would have preferred if we either left this code as it was, or that we made this constant something like JSX rather than triple question marks. It's entirely stylistic though so I'm gonna go ahead and approve and land this.
| onSubmit={this.startRebase} | ||
| loading={loading} | ||
| disabled={disabled} | ||
| dismissable={true} |
There was a problem hiding this comment.
Again, stylistic, but dismissible is the default value so we could just omit this.

Overview
Closes #6551
Closes #7012
Closes #6961
Description
This is the first part of enabling the user to rebase their current branch from within the app in a guided fashion, and I've omitted much of the background computation from #6959 and #6960 so that I can have something baked to help with testing.
The menu item is enabled only for development currently.
Testing:
TODOcommentsRelease notes
Notes: