Skip to content

With diff.ignoreSubmodules=all in the user's config, Status() reports clean and Diff()/Patch() report nothing despite submodule commits and untracked files #190

Description

@matt-edmondson

What's wrong

GitStatusBuilder (~L84-99), GitDiffBuilder (~L160) and GitPatchBuilder (~L167-188) never pin --ignore-submodules, so a host-level diff.ignoreSubmodules setting changes what they report. No --ignore-submodules appears anywhere under GitIntegration/.

Failure scenario (reproduced on git 2.43)

Submodule s has a local commit plus an untracked file:

  • default status --porcelain=v2 → 1 .M SC.U ... s
  • with -c diff.ignoreSubmodules=all → nothing, so IsClean == true
  • diff --name-status: M s → empty; diff --submodule=short patch → empty
  • adding --ignore-submodules=none restores the output in all three.

Why it matters

A caller asking "is this working copy safe to discard?" gets "clean" on a machine with that setting while unpushed submodule work exists. It is the same class of host-config hazard the repo already closed for status.showUntrackedFiles (CLAUDE.md design point 14, #112).

Suggested fix

Emit --ignore-submodules=none by default in Status, Diff and Patch (optionally with a builder option to choose another level).

Acceptance criteria

  • Integration tests run Status/Diff/Patch with diff.ignoreSubmodules=all set in the repo config and still see the dirty submodule.

Not #124 (closed, diff.submodule format) or #173 (dirty-submodule patch hunks).

Activity

  1. matt-edmondson commented on Oct 7, 2026

    @matt-edmondson
    ContributorAuthor

    Triage


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions