git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git diff --name-only --submodule=diff combination does not work

From
Jeff King <peff@peff.net>
Date
Sep 24, 2020, 06:38 UTC
Message-ID
<20200924063829.GA1851751@coredump.intra.peff.net>
In-Reply-To
<CAD2jYq8OtHUpfUZyXC_+FHew45XEtgty3H-XF_2e30mb6kCCmw@mail.gmail.com>
On Tue, Sep 22, 2020 at 05:32:12PM -0400, Ilan Biala wrote:
> I expected adding --submodule=diff to add all the filenames in
> submodules that were modified, but the output just shows the submodule
> folder name, not all the files within the submodule that were
> modified.

OK. That does sound like a useful thing to show, but AFAIK there is not currently a way to do so. Formats like --name-only and --raw are capable of showing a diff for the submodule entry itself, so they do. And we'd want to continue to be able to do that even when the diff.submodule config option is set. So I suspect it would need to be something like --submodule=name-only. I.e., allowing any diff format to be passed there.

-Peff
Previous: Ilan Biala
Message 4 of 4 in “git diff --name-only --submodule=diff combination does not work”
  1. Ilan BialaSep 22, 2020
  2. Jeff KingSep 22, 2020
  3. Ilan BialaSep 22, 2020
  4. Jeff KingSep 24, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.