Skip to content

Commit 55d8902

Browse files
committed
remove unused config option
1 parent 0582ec5 commit 55d8902

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

gix-worktree/src/index/status/worktree.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub enum Error {
2424
Io(#[from] io::Error),
2525
}
2626

27-
#[derive(Clone)]
27+
#[derive(Clone, Default)]
2828
/// Options that control how the index status of a worktree is computed
2929
pub struct Options {
3030
/// capabilities of the file system
@@ -42,23 +42,6 @@ pub struct Options {
4242
pub stat: index::entry::stat::Options,
4343
// /// A group of attribute patterns that are applied globally, i.e. aren't rooted within the repository itself.
4444
// 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-
}
6245
}
6346

6447
/// Calculates the changes that need to be applied to an index to obtain a
@@ -176,7 +159,7 @@ impl<'index> State<'_, 'index> {
176159
return Err(err.into());
177160
}
178161
};
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) {
180163
return Ok(Some(Change::Added));
181164
}
182165
let new_stat = index::entry::Stat::from_fs(&metadata)?;

0 commit comments

Comments
 (0)