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 22, 2020, 21:24 UTC
Message-ID
<20200922212404.GA547416@coredump.intra.peff.net>
In-Reply-To
<CAD2jYq_-yOgVDd8280+T1E1hT1r0DfN1xFN6V0Hz_v7wnsENpQ@mail.gmail.com>
On Tue, Sep 22, 2020 at 04:56:45PM -0400, Ilan Biala wrote:
> I've been running into issues with using the --name-only and
> --submodule=diff flags together in Git 2.27.0. Is this a known bug?
What did you expect it to do, and what did it do instead?

I'm not very familiar with the --submodule flag, but it looks like it only impacts "--patch" output. E.g., in git.git (with the submodule actually populated):

  $ git log --oneline --submodule=diff -p sha1collisiondetection
  4125f78222 sha1dc: update from upstream
  Submodule sha1collisiondetection 16033998da..855827c583:
    > Detect endianess on HP-UX
  07a20f569b Makefile: fix unaligned loads in sha1dc with UBSan
  Submodule sha1collisiondetection 232357eb2e..16033998da:
    > Shorter version of force aligned access.
    > Add compiler option to force aligned access even for Intel CPUs.
  23e37f8e9d sha1dc: update from upstream
  Submodule sha1collisiondetection 19d97bf5af..232357eb2e:
    > Merge pull request #45 from avar/aix-big-endian-detection
    > sha1c: fix a trivial spelling error
  86cfd61e6b sha1dc: optionally use sha1collisiondetection as a submodule
  Submodule sha1collisiondetection 0000000000...19d97bf5af (new submodule)
  $ git log --oneline --submodule=log --raw sha1collisiondetection
  4125f78222 sha1dc: update from upstream
  :160000 160000 16033998da 855827c583 M  sha1collisiondetection
  07a20f569b Makefile: fix unaligned loads in sha1dc with UBSan
  :160000 160000 232357eb2e 16033998da M  sha1collisiondetection
  23e37f8e9d sha1dc: update from upstream
  :160000 160000 19d97bf5af 232357eb2e M  sha1collisiondetection
  86cfd61e6b sha1dc: optionally use sha1collisiondetection as a submodule
  :000000 160000 0000000000 19d97bf5af A  sha1collisiondetection
-Peff
Previous: Ilan BialaNext: Ilan Biala
Message 2 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.