mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
parent
5d01da1c93
commit
d541d0d9f8
3 changed files with 18 additions and 14 deletions
|
|
@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Unreleased
|
||||
|
||||
## Fixed
|
||||
- appropriate error message when pulling deleted remote branch ([#911](https://github.com/extrawurst/gitui/issues/991))
|
||||
|
||||
## [0.17.1] - 2021-09-10
|
||||
|
||||
**fuzzy find files**
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ impl App {
|
|||
self.compare_commits_popup.update_git(ev)?;
|
||||
self.push_popup.update_git(ev)?;
|
||||
self.push_tags_popup.update_git(ev)?;
|
||||
self.pull_popup.update_git(ev)?;
|
||||
self.pull_popup.update_git(ev);
|
||||
self.select_branch_popup.update_git(ev)?;
|
||||
}
|
||||
|
||||
|
|
@ -686,7 +686,11 @@ impl App {
|
|||
flags.insert(NeedsUpdate::ALL);
|
||||
}
|
||||
InternalEvent::Pull(branch) => {
|
||||
self.pull_popup.fetch(branch)?;
|
||||
if let Err(error) = self.pull_popup.fetch(branch) {
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
error.to_string(),
|
||||
));
|
||||
}
|
||||
flags.insert(NeedsUpdate::ALL);
|
||||
}
|
||||
InternalEvent::PushTags => {
|
||||
|
|
|
|||
|
|
@ -110,17 +110,18 @@ impl PullComponent {
|
|||
}
|
||||
|
||||
///
|
||||
pub fn update_git(
|
||||
&mut self,
|
||||
ev: AsyncGitNotification,
|
||||
) -> Result<()> {
|
||||
pub fn update_git(&mut self, ev: AsyncGitNotification) {
|
||||
if self.is_visible() {
|
||||
if let AsyncGitNotification::Fetch = ev {
|
||||
self.update()?;
|
||||
if let Err(error) = self.update() {
|
||||
self.pending = false;
|
||||
self.hide();
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("fetch failed:\n{}", error),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
///
|
||||
|
|
@ -135,11 +136,7 @@ impl PullComponent {
|
|||
if err.is_empty() {
|
||||
self.try_ff_merge()?;
|
||||
} else {
|
||||
self.pending = false;
|
||||
self.hide();
|
||||
self.queue.push(InternalEvent::ShowErrorMsg(
|
||||
format!("fetch failed:\n{}", err),
|
||||
));
|
||||
anyhow::bail!(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue