{"thread":{"id":"64422","subject":"git diff: --submodule=diff does not synergise with --name-only","startedAt":"2025-11-03T10:51:19Z","lastAt":"2025-11-03T10:51:19Z","messageCount":1,"participants":["Sainan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"530114","messageId":"C6Lp4oh3zEx1R6wysONzY_opvR6SE1GVNIHwMp1tXuAp_ob7jehtLPbu7XguZdU6vQ_Djq7ADBHOLrn3g4am4brUiiS6yzwpDCjIK_QaR00=@calamity.inc","threadId":"64422","inReplyTo":null,"subject":"git diff: --submodule=diff does not synergise with --name-only","fromName":"Sainan","fromEmail":"sainan@calamity.inc","sentAt":"2025-11-03T10:51:10Z","receivedAt":"2025-11-03T10:51:19Z","isPatch":false,"sender":{"key":"sainan@calamity.inc","avatar":null},"body":"Hi, I'm using Git v2.51.2.windows.1 but this bug may have existed as far back as when --submodule=diff was introduced according to my research.\n\nTo reproduce this, you need a repository with a submodule which was changed since a given tag, then it can be observed like so:\n\n1. git diff --name-only --submodule=diff <tag> | wc -l\n2. git diff --submodule=diff <tag> | grep \"diff --git\" | wc -l\n\nYou should notice a discrepency between the line counts because in the first case only the submodule path is listed, whereas in the second case it correctly recurses into the submodule and lists the files changed in those submodules.\n\n-- Sainan\n"}]}