@@ -103,14 +103,13 @@ impl Repository {
103
103
///
104
104
/// When only excludes are desired, this is the most efficient way to obtain them. Otherwise use
105
105
/// [`Repository::attributes()`] for accessing both attributes and excludes.
106
- // TODO: test, provide higher-level custom Cache wrapper that is much easier to use and doesn't panic when accessing entries
107
- // by non-relative path.
106
+ // TODO: test
108
107
pub fn excludes (
109
108
& self ,
110
109
index : & gix_index:: State ,
111
110
overrides : Option < gix_ignore:: Search > ,
112
111
source : gix_worktree:: stack:: state:: ignore:: Source ,
113
- ) -> Result < gix_worktree :: Stack , config:: exclude_stack:: Error > {
112
+ ) -> Result < AttributeStack < ' _ > , config:: exclude_stack:: Error > {
114
113
let case = if self . config . ignore_case {
115
114
gix_glob:: pattern:: Case :: Fold
116
115
} else {
@@ -122,13 +121,16 @@ impl Repository {
122
121
. assemble_exclude_globals ( self . git_dir ( ) , overrides, source, & mut buf) ?;
123
122
let state = gix_worktree:: stack:: State :: IgnoreStack ( ignore) ;
124
123
let attribute_list = state. id_mappings_from_index ( index, index. path_backing ( ) , case) ;
125
- Ok ( gix_worktree:: Stack :: new (
126
- // this is alright as we don't cause mutation of that directory, it's virtual.
127
- self . work_dir ( ) . unwrap_or ( self . git_dir ( ) ) ,
128
- state,
129
- case,
130
- buf,
131
- attribute_list,
124
+ Ok ( AttributeStack :: new (
125
+ gix_worktree:: Stack :: new (
126
+ // this is alright as we don't cause mutation of that directory, it's virtual.
127
+ self . work_dir ( ) . unwrap_or ( self . git_dir ( ) ) ,
128
+ state,
129
+ case,
130
+ buf,
131
+ attribute_list,
132
+ ) ,
133
+ self ,
132
134
) )
133
135
}
134
136
}
0 commit comments