mirror of
https://github.com/desktop/desktop
synced 2024-08-25 03:07:41 +00:00
Set target branch when chosen
This commit is contained in:
parent
e96d8188e5
commit
0a5c1edd31
|
@ -2874,7 +2874,7 @@ export class App extends React.Component<IAppProps, IAppState> {
|
|||
branchCreated: false,
|
||||
commits,
|
||||
},
|
||||
tip.branch,
|
||||
null,
|
||||
commits,
|
||||
tip.branch.tip.sha
|
||||
)
|
||||
|
|
|
@ -3192,6 +3192,19 @@ export class Dispatcher {
|
|||
return this.appStore._setMultiCommitOperationStep(repository, step)
|
||||
}
|
||||
|
||||
/** Set the multi commit operation target branch */
|
||||
public setMultiCommitOperationTargetBranch(
|
||||
repository: Repository,
|
||||
targetBranch: Branch
|
||||
): void {
|
||||
this.repositoryStateManager.updateMultiCommitOperationState(
|
||||
repository,
|
||||
() => ({
|
||||
targetBranch,
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
/** Set cherry-pick branch created state */
|
||||
public setCherryPickBranchCreated(
|
||||
repository: Repository,
|
||||
|
|
|
@ -160,7 +160,7 @@ export abstract class CherryPick extends BaseMultiCommitOperation {
|
|||
}
|
||||
|
||||
const { commits, sourceBranch } = operationDetail
|
||||
|
||||
dispatcher.setMultiCommitOperationTargetBranch(repository, targetBranch)
|
||||
dispatcher.setCherryPickBranchCreated(repository, false)
|
||||
dispatcher.cherryPick(repository, targetBranch, commits, sourceBranch)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue