@@ -7,7 +7,7 @@ use bstr::BStr;
77use filetime:: { set_file_mtime, FileTime } ;
88use gix_filter:: eol:: AutoCrlf ;
99use gix_index as index;
10- use gix_index:: Entry ;
10+ use gix_index:: { entry , Entry } ;
1111use gix_status:: index_as_worktree:: Context ;
1212use gix_status:: {
1313 index_as_worktree,
@@ -231,7 +231,7 @@ fn deracify_status(status: EntryStatus) -> Option<EntryStatus> {
231231 EntryStatus :: Conflict ( c) => EntryStatus :: Conflict ( c) ,
232232 EntryStatus :: Change ( c) => match c {
233233 Change :: Removed => Change :: Removed ,
234- Change :: Type => Change :: Type ,
234+ Change :: Type { worktree_mode } => Change :: Type { worktree_mode } ,
235235 Change :: Modification {
236236 executable_bit_changed,
237237 content_change,
@@ -284,7 +284,17 @@ fn nonfile_untracked_are_not_visible() {
284284#[ test]
285285#[ cfg( unix) ]
286286fn 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+ ) ;
288298}
289299
290300#[ test]
@@ -384,7 +394,17 @@ fn subomdule_deleted_dir() {
384394#[ test]
385395fn subomdule_typechange ( ) {
386396 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+ ) ,
388408 Outcome {
389409 entries_to_process: 2 ,
390410 entries_processed: 2 ,
@@ -596,7 +616,14 @@ fn refresh() {
596616 }
597617 . into( ) ,
598618 ) ,
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+ ) ,
600627 (
601628 BStr :: new( b"executable" ) ,
602629 4 ,
@@ -620,7 +647,14 @@ fn refresh() {
620647 }
621648 . into( ) ,
622649 ) ,
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+ ) ,
624658 (
625659 BStr :: new( "executable" ) ,
626660 4 ,
@@ -669,7 +703,14 @@ fn modified() {
669703 }
670704 . into ( ) ,
671705 ) ,
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+ ) ,
673714 (
674715 BStr :: new ( b"executable" ) ,
675716 4 ,
@@ -693,7 +734,14 @@ fn modified() {
693734 }
694735 . into ( ) ,
695736 ) ,
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+ ) ,
697745 (
698746 BStr :: new ( "executable" ) ,
699747 4 ,
0 commit comments