Skip to content

Pin --ignore-submodules=none in Status, Diff and Patch [patch] - #222

Merged
matt-edmondson merged 3 commits into
mainfrom
fix/190-ignore-submodules-none
Oct 22, 2026
Merged

matt-edmondson merged 3 commits into
mainfrom
fix/190-ignore-submodules-none

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #190

What changed

  • GitStatusBuilder, GitDiffBuilder and GitPatchBuilder now always emit --ignore-submodules=none. Before this, a host's diff.ignoreSubmodules=all made Status() report IsClean == true, and Diff()/Patch() report nothing, while a submodule had a new commit and an untracked file. This is the same kind of host-config leak Status() can silently omit untracked files depending on the host's status.showUntrackedFiles config #112 closed for --untracked-files.
  • One thing callers can see: the flag also overrides a per-submodule submodule.<name>.ignore in .gitmodules. That fits the issue's goal of reporting the same answer on every host.
  • CLAUDE.md design point 14 now mentions the new pin.

Tests

  • New integration test GitSubmoduleTests.StatusDiffAndPatchReportASubmoduleTheHostIgnoresAsync. It sets diff.ignoreSubmodules=all in the superproject's config, commits in the submodule and adds an untracked file there, then checks that Status, Diff and Patch all report libs/sub.
  • The three default-vector unit tests now include the flag.

Verification

  • With the builder changes reverted, the new test fails (Assert.IsFalse(status.IsClean)).
  • With the fix in place, the full suite passes locally on net10.0 with git 2.43: 878/878.

🤖 Generated with Claude Code

https://claude.ai/code/session_016vf9SXXkfFir6zugMSNM3b


Generated by Claude Code

A host's diff.ignoreSubmodules=all made Status() report clean, and
Diff()/Patch() report nothing, while a submodule held unpushed commits
and untracked files. Pinning none reports the submodule however the
host is configured, the same way --untracked-files is already pinned.

Fixes #190

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016vf9SXXkfFir6zugMSNM3b

Copy link
Copy Markdown
Contributor Author

ci / .NET / Analyze & Release failed on 5083951. I don't think this PR caused it: the SonarCloud scanner's POST https://api.sonarcloud.io/analysis/analyses returned HTTP 500 before any analysis ran (Unable to create analysis: HTTP code 500), so the failure is on SonarCloud's side. Every test job passed on this commit, Windows included. There's nothing in the repo to change for it, so I've re-run the failed job once.


Generated by Claude Code

This was referenced Oct 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit f2b3636 into main Oct 22, 2026
17 checks passed
@matt-edmondson
matt-edmondson deleted the fix/190-ignore-submodules-none branch October 22, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants