File tree 4 files changed +26
-8
lines changed
4 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
![ charcount] ( assets/char_count.gif )
15
15
16
16
### Fixed
17
+ - fix some potential errors when deleting files while they are being diffed ([ #490 ] ( https://github.com/extrawurst/gitui/issues/490 ) )
17
18
- push defaults to 'origin' remote if it exists ([ #494 ] ( https://github.com/extrawurst/gitui/issues/494 ) )
18
19
- support missing pageUp/down support in branchlist ([ #519 ] ( https://github.com/extrawurst/gitui/issues/519 ) )
19
20
- don't hide branch name while in commit dialog ([ #529 ] ( https://github.com/extrawurst/gitui/issues/529 ) )
Original file line number Diff line number Diff line change 5
5
cargo run --features=timing,pprof -- -l
6
6
7
7
debug :
8
- cargo run --features=timing -- -l
8
+ RUST_BACKTRACE=true cargo run --features=timing -- -l
9
9
10
10
build-release :
11
11
cargo build --release
Original file line number Diff line number Diff line change @@ -118,8 +118,14 @@ impl AsyncDiff {
118
118
arc_last,
119
119
arc_current,
120
120
hash,
121
- )
122
- . expect ( "error getting diff" ) ;
121
+ ) ;
122
+
123
+ let notify = if let Err ( err) = notify {
124
+ log:: error!( "get_diff_helper error: {}" , err) ;
125
+ true
126
+ } else {
127
+ false
128
+ } ;
123
129
124
130
arc_pending. fetch_sub ( 1 , Ordering :: Relaxed ) ;
125
131
Original file line number Diff line number Diff line change @@ -518,6 +518,16 @@ impl DiffComponent {
518
518
) ;
519
519
}
520
520
521
+ fn stage_unstage_hunk ( & mut self ) -> Result < ( ) > {
522
+ if self . current . is_stage {
523
+ self . unstage_hunk ( ) ?;
524
+ } else {
525
+ self . stage_hunk ( ) ?;
526
+ }
527
+
528
+ Ok ( ( ) )
529
+ }
530
+
521
531
const fn is_stage ( & self ) -> bool {
522
532
self . current . is_stage
523
533
}
@@ -659,11 +669,12 @@ impl Component for DiffComponent {
659
669
} else if e == self . key_config . enter
660
670
&& !self . is_immutable
661
671
{
662
- if self . current . is_stage {
663
- self . unstage_hunk ( ) ?;
664
- } else {
665
- self . stage_hunk ( ) ?;
666
- }
672
+ try_or_popup ! (
673
+ self ,
674
+ "hunk error:" ,
675
+ self . stage_unstage_hunk( )
676
+ ) ;
677
+
667
678
Ok ( true )
668
679
} else if e == self . key_config . status_reset_item
669
680
&& !self . is_immutable
You can’t perform that action at this time.
0 commit comments