mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
Switch to status tab after merge / rebase with conflicts (#932)
This commit is contained in:
parent
c6abbaf4d4
commit
d84120a895
2 changed files with 14 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## Added
|
## Added
|
||||||
- support rebasing branches with conflicts ([#895](https://github.com/extrawurst/gitui/issues/895))
|
- support rebasing branches with conflicts ([#895](https://github.com/extrawurst/gitui/issues/895))
|
||||||
|
- switch to status tab after merging or rebasing with conflicts ([#926](https://github.com/extrawurst/gitui/issues/926))
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
- fix supported checkout of hierarchical branchnames ([#921](https://github.com/extrawurst/gitui/issues/921))
|
- fix supported checkout of hierarchical branchnames ([#921](https://github.com/extrawurst/gitui/issues/921))
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ use asyncgit::{
|
||||||
RemoteBranch,
|
RemoteBranch,
|
||||||
},
|
},
|
||||||
checkout_branch, get_branches_info, BranchInfo, CommitId,
|
checkout_branch, get_branches_info, BranchInfo, CommitId,
|
||||||
|
RepoState,
|
||||||
},
|
},
|
||||||
AsyncGitNotification, CWD,
|
AsyncGitNotification, CWD,
|
||||||
};
|
};
|
||||||
|
|
@ -368,8 +369,7 @@ impl BranchListComponent {
|
||||||
{
|
{
|
||||||
sync::merge_branch(CWD, &branch.name)?;
|
sync::merge_branch(CWD, &branch.name)?;
|
||||||
|
|
||||||
self.hide();
|
self.hide_and_switch_tab()?;
|
||||||
self.queue.push(InternalEvent::Update(NeedsUpdate::ALL));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
@ -381,9 +381,18 @@ impl BranchListComponent {
|
||||||
{
|
{
|
||||||
sync::rebase_branch(CWD, &branch.name)?;
|
sync::rebase_branch(CWD, &branch.name)?;
|
||||||
|
|
||||||
self.hide();
|
self.hide_and_switch_tab()?;
|
||||||
|
}
|
||||||
|
|
||||||
self.queue.push(InternalEvent::Update(NeedsUpdate::ALL));
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn hide_and_switch_tab(&mut self) -> Result<()> {
|
||||||
|
self.hide();
|
||||||
|
self.queue.push(InternalEvent::Update(NeedsUpdate::ALL));
|
||||||
|
|
||||||
|
if sync::repo_state(CWD)? != RepoState::Clean {
|
||||||
|
self.queue.push(InternalEvent::TabSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue