Skip to content

Commit f8471b1

Browse files
committed
adapt to changes in gix-submodule
1 parent 25c5bce commit f8471b1

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

gix/src/submodule/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub mod is_active {
3939
#[error(transparent)]
4040
InitIsActivePlatform(#[from] gix_submodule::is_active_platform::Error),
4141
#[error(transparent)]
42-
QueryIsActive(#[from] gix_submodule::is_active_platform::is_active::Error),
42+
QueryIsActive(#[from] gix_config::value::Error),
4343
#[error(transparent)]
4444
InitAttributes(#[from] crate::config::attribute_stack::Error),
4545
#[error(transparent)]

gix/src/submodule/mod.rs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,16 @@ impl<'repo> Submodule<'repo> {
140140
/// Please see the [plumbing crate documentation](gix_submodule::IsActivePlatform::is_active()) for details.
141141
pub fn is_active(&self) -> Result<bool, is_active::Error> {
142142
let (mut platform, mut attributes) = self.state.active_state_mut()?;
143-
let is_active = platform.is_active(
144-
&self.state.modules,
145-
&self.state.repo.config.resolved,
146-
self.name.as_ref(),
147-
{
148-
|relative_path, case, is_dir, out| {
149-
attributes
150-
.set_case(case)
151-
.at_entry(relative_path, Some(is_dir), |id, buf| {
152-
self.state.repo.objects.find_blob(id, buf)
153-
})
154-
.map_or(false, |platform| platform.matching_attributes(out))
155-
}
156-
},
157-
)?;
143+
let is_active = platform.is_active(&self.state.repo.config.resolved, self.name.as_ref(), {
144+
|relative_path, case, is_dir, out| {
145+
attributes
146+
.set_case(case)
147+
.at_entry(relative_path, Some(is_dir), |id, buf| {
148+
self.state.repo.objects.find_blob(id, buf)
149+
})
150+
.map_or(false, |platform| platform.matching_attributes(out))
151+
}
152+
})?;
158153
Ok(is_active)
159154
}
160155

0 commit comments

Comments
 (0)