File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
gitoxide-core/src/repository Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,18 @@ pub(crate) mod function {
83
83
. adjust_for_bare ( repo. is_bare ( ) ) ,
84
84
) ?;
85
85
for pattern in pathspec. search ( ) . patterns ( ) {
86
- let entry = cache. at_entry ( pattern. path ( ) , Some ( false ) ) ?;
86
+ let path = pattern. path ( ) ;
87
+ let entry = cache. at_entry (
88
+ path,
89
+ pattern
90
+ . signature
91
+ . contains ( gix:: pathspec:: MagicSignature :: MUST_BE_DIR )
92
+ . into ( ) ,
93
+ ) ?;
87
94
if !entry. matching_attributes ( & mut matches) {
88
95
continue ;
89
96
}
90
- print_match ( & matches, pattern . path ( ) , & mut out) ?;
97
+ print_match ( & matches, path, & mut out) ?;
91
98
}
92
99
}
93
100
}
Original file line number Diff line number Diff line change @@ -88,11 +88,18 @@ pub fn query(
88
88
. adjust_for_bare ( repo. is_bare ( ) ) ,
89
89
) ?;
90
90
for pattern in pathspec. search ( ) . patterns ( ) {
91
- let entry = cache. at_entry ( pattern. path ( ) , None ) ?;
91
+ let path = pattern. path ( ) ;
92
+ let entry = cache. at_entry (
93
+ path,
94
+ pattern
95
+ . signature
96
+ . contains ( gix:: pathspec:: MagicSignature :: MUST_BE_DIR )
97
+ . into ( ) ,
98
+ ) ?;
92
99
let match_ = entry
93
100
. matching_exclude_pattern ( )
94
101
. and_then ( |m| ( show_ignore_patterns || !m. pattern . is_negative ( ) ) . then_some ( m) ) ;
95
- print_match ( match_, pattern . path ( ) , & mut out) ?;
102
+ print_match ( match_, path, & mut out) ?;
96
103
}
97
104
}
98
105
}
You can’t perform that action at this time.
0 commit comments