We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
can_push
1 parent 9e55f95 commit ac2f652Copy full SHA for ac2f652
src/tabs/status.rs
@@ -376,17 +376,19 @@ impl Status {
376
}
377
378
fn push(&self, force: bool) {
379
- if let Some(branch) = self.git_branch_name.last() {
380
- if force {
381
- self.queue.borrow_mut().push_back(
382
- InternalEvent::ConfirmAction(Action::ForcePush(
383
- branch, force,
384
- )),
385
- );
386
- } else {
387
- self.queue
388
- .borrow_mut()
389
- .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 {
+ InternalEvent::Push(branch, force),
390
391
+ }
392
393
394
0 commit comments