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

Re: [PATCH] gitk: Use the --submodule option for diffs

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 28, 2009, 07:19 UTC
Message-ID
<7v7hugrnmy.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4AE70AC9.6040302@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 12 quoted lines
> Instead of just showing not-quite-helpful SHA-1 pairs display the first
> lines of the corresponding commit messages in the submodule (similar to
> the output of 'git submodule summary').
>
> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
> ---
>
> This patch applies to 'next' and uses the new --submodule option of git
> diff to achieve a more meaningful output of submodule differences in
> gitk.
>
> Any objections against making this the default?

It looks like you are not making this the default, but are making it mandatory. That's quite different.

As long as gitk ships with matching version of git, I do not think it is a huge problem to force "diff" to always run with --submodule option, but if that is what the patch does, I'd prefer to see the patch says so, instead of giving a false impression that there may be a way to disable it if one wants to.

Looking at the patched text, I had to wonder where these $flags come from. The callers of "diffcmd" give it to you, and I am not sure if all of them want -p format diffs. Specifically, what does gettreediffs do? Does it make sense to give --submodule to that invocation?

Yes, I know --submodule happens to be a no-op in non-patch format diffs, but I do not think that is by design. It is something somebody may notice and correct it later, at which time this patch will be broken.

I also suspect that this might break getpatchid, but as long as all the patches consistently change/break ids it would be Ok.

Previous: Paul Mackerras
Message 6 of 6 in “gitk: Use the --submodule option for diffs”
  1. gitk: Use the --submodule option for diffsJens Lehmann, Oct 27, 2009
  2. Johannes SchindelinOct 27, 2009
  3. Paul MackerrasOct 28, 2009
  4. gitk: Use the --submodule option for displaying diffs when availableJens Lehmann, Oct 28, 2009
  5. Paul MackerrasNov 3, 2009
  6. Junio C HamanoOct 28, 2009

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.