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

Re: [PATCH] gitk: don't highlight files after submodules as submodules

From
Paul Mackerras <paulus@ozlabs.org>
Date
Dec 15, 2019, 04:39 UTC
Message-ID
<20191215043926.GE12512@blackberry>
In-Reply-To
<20191101233427.4108-1-dpb@corrigendum.ru>
On Sat, Nov 02, 2019 at 02:34:27AM +0300, Роман Донченко wrote:
Show 18 quoted lines
> gitk applies submodule highlighting (coloring lines starting with
> "  >" and "  <") when `currdiffsubmod` is not an empty string.
> However, it fails to reset `currdiffsubmod` after a submodule diff
> ends, so any file diffs following a submodule diff will still be
> highlighted as if they were submodule diffs.
> 
> There are two problems with the way gitk tries to reset `currdiffsubmod`:
> 
> 1. The code says `set $currdiffsubmod` instead of `set currdiffsubmod`,
>    so it actually sets the variable whose name is the submodule path
>    instead.
> 
> 2. It tries to do it after the first line in a submodule diff, which
>    is incorrect, since submodule diffs can contain multiple lines.
> 
> Fix this by resetting `currdiffsubmod` when a file diff starts.
> 
> Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
Thanks, patch applied.
Paul.
Previous: Роман Донченко
Message 2 of 2 in “gitk: don't highlight files after submodules as submodules”
  1. gitk: don't highlight files after submodules as submodulesРоман Донченко, Nov 1, 2019
  2. Paul MackerrasDec 15, 2019

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.