@@ -7,7 +7,7 @@ use bstr::BStr;
7
7
use filetime:: { set_file_mtime, FileTime } ;
8
8
use gix_filter:: eol:: AutoCrlf ;
9
9
use gix_index as index;
10
- use gix_index:: Entry ;
10
+ use gix_index:: { entry , Entry } ;
11
11
use gix_status:: index_as_worktree:: Context ;
12
12
use gix_status:: {
13
13
index_as_worktree,
@@ -231,7 +231,7 @@ fn deracify_status(status: EntryStatus) -> Option<EntryStatus> {
231
231
EntryStatus :: Conflict ( c) => EntryStatus :: Conflict ( c) ,
232
232
EntryStatus :: Change ( c) => match c {
233
233
Change :: Removed => Change :: Removed ,
234
- Change :: Type => Change :: Type ,
234
+ Change :: Type { worktree_mode } => Change :: Type { worktree_mode } ,
235
235
Change :: Modification {
236
236
executable_bit_changed,
237
237
content_change,
@@ -284,7 +284,17 @@ fn nonfile_untracked_are_not_visible() {
284
284
#[ test]
285
285
#[ cfg( unix) ]
286
286
fn tracked_changed_to_non_file ( ) {
287
- nonfile_fixture ( "tracked-swapped" , & [ ( BStr :: new ( b"file" ) , 0 , Change :: Type . into ( ) ) ] ) ;
287
+ nonfile_fixture (
288
+ "tracked-swapped" ,
289
+ & [ (
290
+ BStr :: new ( b"file" ) ,
291
+ 0 ,
292
+ Change :: Type {
293
+ worktree_mode : entry:: Mode :: FILE ,
294
+ }
295
+ . into ( ) ,
296
+ ) ] ,
297
+ ) ;
288
298
}
289
299
290
300
#[ test]
@@ -384,7 +394,17 @@ fn subomdule_deleted_dir() {
384
394
#[ test]
385
395
fn subomdule_typechange ( ) {
386
396
assert_eq ! (
387
- submodule_fixture( "type-change" , & [ ( BStr :: new( b"m1" ) , 1 , Change :: Type . into( ) ) ] ) ,
397
+ submodule_fixture(
398
+ "type-change" ,
399
+ & [ (
400
+ BStr :: new( b"m1" ) ,
401
+ 1 ,
402
+ Change :: Type {
403
+ worktree_mode: entry:: Mode :: FILE
404
+ }
405
+ . into( )
406
+ ) ]
407
+ ) ,
388
408
Outcome {
389
409
entries_to_process: 2 ,
390
410
entries_processed: 2 ,
@@ -596,7 +616,14 @@ fn refresh() {
596
616
}
597
617
. into( ) ,
598
618
) ,
599
- ( BStr :: new( b"empty" ) , 3 , Change :: Type . into( ) ) ,
619
+ (
620
+ BStr :: new( b"empty" ) ,
621
+ 3 ,
622
+ Change :: Type {
623
+ worktree_mode: entry:: Mode :: FILE
624
+ }
625
+ . into( )
626
+ ) ,
600
627
(
601
628
BStr :: new( b"executable" ) ,
602
629
4 ,
@@ -620,7 +647,14 @@ fn refresh() {
620
647
}
621
648
. into( ) ,
622
649
) ,
623
- ( BStr :: new( "empty" ) , 3 , Change :: Type . into( ) ) ,
650
+ (
651
+ BStr :: new( "empty" ) ,
652
+ 3 ,
653
+ Change :: Type {
654
+ worktree_mode: entry:: Mode :: FILE
655
+ }
656
+ . into( )
657
+ ) ,
624
658
(
625
659
BStr :: new( "executable" ) ,
626
660
4 ,
@@ -669,7 +703,14 @@ fn modified() {
669
703
}
670
704
. into ( ) ,
671
705
) ,
672
- ( BStr :: new ( b"empty" ) , 3 , Change :: Type . into ( ) ) ,
706
+ (
707
+ BStr :: new ( b"empty" ) ,
708
+ 3 ,
709
+ Change :: Type {
710
+ worktree_mode : entry:: Mode :: FILE ,
711
+ }
712
+ . into ( ) ,
713
+ ) ,
673
714
(
674
715
BStr :: new ( b"executable" ) ,
675
716
4 ,
@@ -693,7 +734,14 @@ fn modified() {
693
734
}
694
735
. into ( ) ,
695
736
) ,
696
- ( BStr :: new ( "empty" ) , 3 , Change :: Type . into ( ) ) ,
737
+ (
738
+ BStr :: new ( "empty" ) ,
739
+ 3 ,
740
+ Change :: Type {
741
+ worktree_mode : entry:: Mode :: FILE ,
742
+ }
743
+ . into ( ) ,
744
+ ) ,
697
745
(
698
746
BStr :: new ( "executable" ) ,
699
747
4 ,
0 commit comments