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

Re: [RFC] Syntax highlighting for combined diff

From
Junio C Hamano <junkio@cox.net>
Date
Oct 21, 2006, 10:40 UTC
Message-ID
<7v4ptygdec.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200610211202.00314.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 24 quoted lines
> Junio C Hamano wrote:
>> Jakub Narebski <jnareb@gmail.com> writes:
>> 
>> > Do I understand code correctly, and the last '+' or '-'
>> > in the parents column means?
>> >
>> >         for (i = 0; i < ecbdata->nparents && len; i++) {
>> >                 if (line[i] == '-')
>> >                         color = DIFF_FILE_OLD;
>> >                 else if (line[i] == '+')
>> >                         color = DIFF_FILE_NEW;
>> >         }
>> >
>> > Anyone who wrote this code, could you answer me, please?
>> 
>> The "up to ecbdata->nparents" is Johannes in cd112ce.  But you
>> are looking at a wrong code, I am afraid, if your original
>> question was about the combined format (there is a comment about
>> the codepath dealing only with two-way diffs by Johannes, above
>> the part you quoted).  The output for combined diff is coming
>> from combine-diff.c:dump_sline().
>
> I was asking both about combined diff format, and how it is colored
> by git-diff --color, to add colored combined diff output to gitweb.

I was answering about both. dump_sline() implements both format and coloring.

> Any other ideas how combined commitdiff should look like in gitweb?

Combined or no combined, one thing that mildly irritates me sometimes is that there does not seem to be an easy and obvious way to do a rough equivalent of typing SPACE repeatedly while viewing "git log -p".

In other words, I think it would be a nice addition to have "go to commitdiff page of this parent" links near the top on the commitdiff page.

Previous: Jakub Narebski
Message 6 of 6 in “[RFC] Syntax highlighting for combined diff”
  1. Jakub NarebskiOct 21, 2006
  2. Junio C HamanoOct 21, 2006
  3. Jakub NarebskiOct 21, 2006
  4. Junio C HamanoOct 21, 2006
  5. Jakub NarebskiOct 21, 2006
  6. Junio C HamanoOct 21, 2006

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.