File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,21 @@ mod access {
107107mod _impls {
108108 use std:: cmp:: Ordering ;
109109
110+ use crate :: { entry, Entry , State } ;
110111 use bstr:: BStr ;
111-
112- use crate :: { Entry , State } ;
112+ use gix_object:: tree:: EntryKind ;
113+
114+ impl From < EntryKind > for entry:: Mode {
115+ fn from ( value : EntryKind ) -> Self {
116+ match value {
117+ EntryKind :: Tree => entry:: Mode :: DIR ,
118+ EntryKind :: Blob => entry:: Mode :: FILE ,
119+ EntryKind :: BlobExecutable => entry:: Mode :: FILE_EXECUTABLE ,
120+ EntryKind :: Link => entry:: Mode :: SYMLINK ,
121+ EntryKind :: Commit => entry:: Mode :: COMMIT ,
122+ }
123+ }
124+ }
113125
114126 impl Entry {
115127 /// Compare one entry to another by their path, by comparing only their common path portion byte by byte, then resorting to
You can’t perform that action at this time.
0 commit comments