File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -376,17 +376,19 @@ impl Status {
376
376
}
377
377
378
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) ) ;
379
+ if self . can_push ( ) {
380
+ if let Some ( branch) = self . git_branch_name . last ( ) {
381
+ if force {
382
+ self . queue . borrow_mut ( ) . push_back (
383
+ InternalEvent :: ConfirmAction (
384
+ Action :: ForcePush ( branch, force) ,
385
+ ) ,
386
+ ) ;
387
+ } else {
388
+ self . queue . borrow_mut ( ) . push_back (
389
+ InternalEvent :: Push ( branch, force) ,
390
+ ) ;
391
+ }
390
392
}
391
393
}
392
394
}
You can’t perform that action at this time.
0 commit comments