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

Re: git diff --submodule=diff and --stat/--dirstat/--name-only

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Oct 14, 2020, 13:29 UTC
Message-ID
<E3D98950-2EA1-4BFE-8A2D-CE8AEAF5AD39@gmail.com>
In-Reply-To
<CA+3n-TrVncSq6kY8sTTw=LiOvLKe=6k1yBE8cmmR3i40CaXR6w@mail.gmail.com>
Hi Marc,
Show 30 quoted lines
> Le 14 oct. 2020 à 06:14, Marc Sune <marcdevel@gmail.com> a écrit :
> 
> Hello all,
> 
> First, thank you to the community for the great work. Worth saying it
> from time to time, I think.
> 
> I am dealing with a couple of big repositories that use git
> submodules. They have nested submodules, and some of them are pretty
> huge. I came across:
> 
> git diff --submodule=diff
> 
> Which is very handy for creating some tooling, but it's obviously slow
> - in the order of tens of minutes in my case - for big diffs. I was
> only interested in the list files that changed, in this particular
> case, but:
> 
> git diff --stat --submodule=diff
> 
> doesn't seem to honour `--submodule=diff` and it doesn't go into the
> submodule(s) nor recurses, of course. Other options like `--dirstat`
> or `--name-only` seem to behave the same way.
> 
> I've tried this v2.20.1 and the HEAD of master (d4a392452e) with the
> same results. Is this a missing feature, a bug or is it just the
> intended behaviour?
> 
> Regards
> marc

This would indeed be useful. It's a missing feature, and so intended behaviour for the moment, I would say. It was discussed recently on the list [1] :

[1] https://lore.kernel.org/git/20200924063829.GA1851751@coredump.intra.peff.net/t/#u
Cheers,
Philippe.
Previous: Marc SuneNext: Marc Sune
Message 2 of 5 in “git diff --submodule=diff and --stat/--dirstat/--name-only”
  1. Marc SuneOct 14, 2020
  2. Philippe BlainOct 14, 2020
  3. Marc SuneOct 14, 2020
  4. Philippe BlainOct 14, 2020
  5. Marc SuneOct 14, 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.