@@ -24,7 +24,7 @@ pub enum Error {
24
24
Io ( #[ from] io:: Error ) ,
25
25
}
26
26
27
- #[ derive( Clone ) ]
27
+ #[ derive( Clone , Default ) ]
28
28
/// Options that control how the index status of a worktree is computed
29
29
pub struct Options {
30
30
/// capabilities of the file system
@@ -42,23 +42,6 @@ pub struct Options {
42
42
pub stat : index:: entry:: stat:: Options ,
43
43
// /// A group of attribute patterns that are applied globally, i.e. aren't rooted within the repository itself.
44
44
// pub attribute_globals: gix_attributes::MatchGroup<Attributes>,
45
- /// Untracked files that were added to the index with git add but not yet committed
46
- /// are marked with special flags and usually receive special treatment. If this option
47
- /// is enabled (default true) added events are generated for these files, otherwise
48
- /// these files are treated the same as other entries
49
- pub check_added : bool ,
50
- }
51
-
52
- impl Default for Options {
53
- fn default ( ) -> Self {
54
- Options {
55
- fs : fs:: Capabilities :: default ( ) ,
56
- thread_limit : None ,
57
- keep_going : false ,
58
- stat : index:: entry:: stat:: Options :: default ( ) ,
59
- check_added : true ,
60
- }
61
- }
62
45
}
63
46
64
47
/// Calculates the changes that need to be applied to an index to obtain a
@@ -176,7 +159,7 @@ impl<'index> State<'_, 'index> {
176
159
return Err ( err. into ( ) ) ;
177
160
}
178
161
} ;
179
- if self . options . check_added && entry. flags . contains ( index:: entry:: Flags :: INTENT_TO_ADD ) {
162
+ if entry. flags . contains ( index:: entry:: Flags :: INTENT_TO_ADD ) {
180
163
return Ok ( Some ( Change :: Added ) ) ;
181
164
}
182
165
let new_stat = index:: entry:: Stat :: from_fs ( & metadata) ?;
0 commit comments