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

[gitk] display error for angle brackets in diff

From
YYojem <yojem@gmx.com>
Date
Aug 8, 2015, 05:33 UTC
Message-ID
<loom.20150808T073217-282@post.gmane.org>
I'm trying to report a bug that I've know about for a year and half. I first
tried to report it to this mailing list a year ago, but the message was
lost. Here's a post I made on reddit 6 months ago:
http://www.reddit.com/r/git/comments/2twvsz/please_help_me_report_this_gitk_bug_to_the_git/
 
The problem is that diffs with angle brackets are displayed incorrectly in gitk.
 
How to reproduce the bug:
 
Create a file with the following, and commit:
x < 1
y > 2
 
Modify it to this, and commit:
z < 1
w > 2
 
Then view the results with:
gitk --color-words
 
You will see:
    "Diff" shows bogus removal on 1st line and bogus addition on 2nd line.
    "Old version" cuts off at right angle bracket.
    "New Version" cuts off at left angle bracket.

I personally use a 2-line patch to fix this by disabling/breaking the feature that does string comparisons for " >" and " <", but I know that's not the correct fix, so I'm not including it in this post.

Message 1 of 1 in “[gitk] display error for angle brackets in diff”
  1. YojemAug 8, 2015

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.