Skip to content

Commit

Permalink
fix: show submodules in status independently of their active state.
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Byron committed Apr 3, 2024
1 parent c136329 commit 719ced8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gix/src/status/index_worktree.rs
Expand Up @@ -199,10 +199,7 @@ mod submodule_status {
let local_repo = repo.to_thread_local();
let submodule_paths = match local_repo.submodules()? {
Some(sm) => {
let mut v: Vec<_> = sm
.filter(|sm| sm.is_active().unwrap_or_default())
.filter_map(|sm| sm.path().ok().map(Cow::into_owned))
.collect();
let mut v: Vec<_> = sm.filter_map(|sm| sm.path().ok().map(Cow::into_owned)).collect();
v.sort();
v
}
Expand Down Expand Up @@ -271,7 +268,8 @@ mod submodule_status {
///
/// ### Submodules
///
/// Note that submodules can be set to 'inactive' which automatically excludes them from the status operation.
/// Note that submodules can be set to 'inactive', which will not exclude them from the status operation, similar to
/// how `git status` includes them.
///
/// ### Index Changes
///
Expand Down

0 comments on commit 719ced8

Please sign in to comment.