gitstatus ignores the `ignore` field of .gitmodules
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.8k
- Forks
- 134
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 1
Description
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:
bar:main ⇡1 !1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing gitstatus's submodule status handling and compare its result with Git's behavior when .gitmodules sets ignore = all. Reproduce the external/foo example and verify that the generated prompt no longer reports an unstaged change for the submodule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, git
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100