mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 17:08:21 +00:00
parent
cc9ecb34a2
commit
5244751e9e
1 changed files with 13 additions and 11 deletions
|
|
@ -376,17 +376,19 @@ impl Status {
|
|||
}
|
||||
|
||||
fn push(&self, force: bool) {
|
||||
if let Some(branch) = self.git_branch_name.last() {
|
||||
if force {
|
||||
self.queue.borrow_mut().push_back(
|
||||
InternalEvent::ConfirmAction(Action::ForcePush(
|
||||
branch, force,
|
||||
)),
|
||||
);
|
||||
} else {
|
||||
self.queue
|
||||
.borrow_mut()
|
||||
.push_back(InternalEvent::Push(branch, force));
|
||||
if self.can_push() {
|
||||
if let Some(branch) = self.git_branch_name.last() {
|
||||
if force {
|
||||
self.queue.borrow_mut().push_back(
|
||||
InternalEvent::ConfirmAction(
|
||||
Action::ForcePush(branch, force),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
self.queue.borrow_mut().push_back(
|
||||
InternalEvent::Push(branch, force),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue