When used with a superproject that specifies submodules with the ignore field set to all, gitstatus will count it as an 'unstaged change' if the submodule is not at its own HEAD.
submodule configuration from .gitmodules:
[submodule "external/foo"]
path = external/foo
url = https://some.server.com/foo
name = foo
ignore = all
running git status doesn't show it as having unstaged changes:
╰─ git status
On branch bar
Your branch is ahead of 'origin/main' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
unless it's run with --ignore-submodules=<value other than 'all'>:
╰─ git status --ignore-submodules=dirty
On branch bar
Your branch is ahead of 'origin/main' by 1 commit.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: external/foo (new commits)
no changes added to commit (use "git add" and/or "git commit -a")
but the prompt string constructed by gitstatus does count it as having unstaged changes:
When used with a superproject that specifies submodules with the
ignorefield set toall,gitstatuswill count it as an 'unstaged change' if the submodule is not at its own HEAD.submodule configuration from
.gitmodules:running
git statusdoesn't show it as having unstaged changes:unless it's run with
--ignore-submodules=<value other than 'all'>:but the prompt string constructed by
gitstatusdoes count it as having unstaged changes: