mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
Fix 586 deadlock pull creds (#587)
* fix deadlock when closing credentials input without completing * fix same deadlock in push/push-tags
This commit is contained in:
parent
973de105e0
commit
39442ba6c2
5 changed files with 16 additions and 9 deletions
|
|
@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
- keep diff line selection after staging/unstaging/discarding ([#583](https://github.com/extrawurst/gitui/issues/583))
|
||||
- fix pull deadlocking when aborting credentials input ([#586](https://github.com/extrawurst/gitui/issues/586))
|
||||
|
||||
## [0.12.0] - 2020-03-03
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,9 @@ impl Component for CredComponent {
|
|||
if let Event::Key(e) = ev {
|
||||
if e == self.key_config.exit_popup {
|
||||
self.hide();
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
if self.input_username.event(ev)?
|
||||
|| self.input_password.event(ev)?
|
||||
{
|
||||
|
|
@ -139,6 +141,7 @@ impl Component for CredComponent {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Ok(true);
|
||||
}
|
||||
Ok(false)
|
||||
|
|
|
|||
|
|
@ -257,9 +257,10 @@ impl Component for PullComponent {
|
|||
if self.visible {
|
||||
if let Event::Key(_) = ev {
|
||||
if self.input_cred.is_visible() {
|
||||
if self.input_cred.event(ev)? {
|
||||
return Ok(true);
|
||||
} else if self.input_cred.get_cred().is_complete()
|
||||
self.input_cred.event(ev)?;
|
||||
|
||||
if self.input_cred.get_cred().is_complete()
|
||||
|| !self.input_cred.is_visible()
|
||||
{
|
||||
self.fetch_from_remote(Some(
|
||||
self.input_cred.get_cred().clone(),
|
||||
|
|
|
|||
|
|
@ -253,9 +253,10 @@ impl Component for PushComponent {
|
|||
if self.visible {
|
||||
if let Event::Key(e) = ev {
|
||||
if self.input_cred.is_visible() {
|
||||
if self.input_cred.event(ev)? {
|
||||
return Ok(true);
|
||||
} else if self.input_cred.get_cred().is_complete()
|
||||
self.input_cred.event(ev)?;
|
||||
|
||||
if self.input_cred.get_cred().is_complete()
|
||||
|| !self.input_cred.is_visible()
|
||||
{
|
||||
self.push_to_remote(
|
||||
Some(self.input_cred.get_cred().clone()),
|
||||
|
|
|
|||
|
|
@ -227,9 +227,10 @@ impl Component for PushTagsComponent {
|
|||
if self.visible {
|
||||
if let Event::Key(e) = ev {
|
||||
if self.input_cred.is_visible() {
|
||||
if self.input_cred.event(ev)? {
|
||||
return Ok(true);
|
||||
} else if self.input_cred.get_cred().is_complete()
|
||||
self.input_cred.event(ev)?;
|
||||
|
||||
if self.input_cred.get_cred().is_complete()
|
||||
|| !self.input_cred.is_visible()
|
||||
{
|
||||
self.push_to_remote(Some(
|
||||
self.input_cred.get_cred().clone(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue