Skip to content

Commit 719ced8

Browse files
committed
fix: show submodules in status independently of their active state.
Even inactive submodules are shown in the status by `git status`, so `gix` should do the same. First observed in helix-editor/helix#5645 (comment)
1 parent c136329 commit 719ced8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

gix/src/status/index_worktree.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,7 @@ mod submodule_status {
199199
let local_repo = repo.to_thread_local();
200200
let submodule_paths = match local_repo.submodules()? {
201201
Some(sm) => {
202-
let mut v: Vec<_> = sm
203-
.filter(|sm| sm.is_active().unwrap_or_default())
204-
.filter_map(|sm| sm.path().ok().map(Cow::into_owned))
205-
.collect();
202+
let mut v: Vec<_> = sm.filter_map(|sm| sm.path().ok().map(Cow::into_owned)).collect();
206203
v.sort();
207204
v
208205
}
@@ -271,7 +268,8 @@ mod submodule_status {
271268
///
272269
/// ### Submodules
273270
///
274-
/// Note that submodules can be set to 'inactive' which automatically excludes them from the status operation.
271+
/// Note that submodules can be set to 'inactive', which will not exclude them from the status operation, similar to
272+
/// how `git status` includes them.
275273
///
276274
/// ### Index Changes
277275
///

0 commit comments

Comments
 (0)