Skip to content

feat(gix): support diff.ignoreSubmodules overrides in status #2107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

davidkna
Copy link
Contributor

@davidkna davidkna commented Aug 7, 2025

This PR adds support for diff.ignoreSubmodules overrides in status. As far as I can tell from experimentation this setting takes priority over submodules.<name>.ignore settings.

I decided not to change submodule::ignore because git also only applies this setting to status/diff and not submodule-specific command. Thus I opted to include it in the AsConfigured handling.

I have built starship with the changes from this PR with the changes from this PR for testing and it appears to work as expected. I would have liked to add a test, but making changes to the config_snapshot for testing appeared to be non-trivial, so I opted to omit that from this PR. I am also not sure if the DiffSubmoduleIgnoreConfig enum variant I added is the preferred way to handle errors in this case.

Related: starship/starship#6840

@davidkna davidkna force-pushed the feat-diff-ignore-sm branch from a40541e to 6582499 Compare August 7, 2025 17:01
@davidkna davidkna force-pushed the feat-diff-ignore-sm branch from 6582499 to 6693ab9 Compare August 7, 2025 17:03
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for tackling this!

I think it's fair to put it there and if it's a problem for anyone, it's still possible to reconfigure the repository configuration in-memory.

I will be pushing some changes in the course of the day and hope it will be merged today as well.

- add `diff.ignoreSubmodules` configuration key with a strong type
- add test assertions to nail most relevant behaviour.
@Byron Byron force-pushed the feat-diff-ignore-sm branch from 585f8c9 to 36cdd6c Compare August 8, 2025 14:50
@Byron Byron enabled auto-merge August 8, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants