Re: [RFC] Syntax highlighting for combined diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> Jakub Narebski <jnareb@xxxxxxxxx> writes:
> 
>> So the question is how to color combined diff format (what should be syntax
>> highlighting for combined diff format). If branches columns have only
>> pluses we use the same color as for adding line in ordinary diff; if
>> branches column consist only of minuses we use the same color as for
>> removing line in ordinary diff. Can there be mixture of plusses and
>> minuses? How git-diff --color solves this?
> 
> UTSL ;-).
> 
> Otherwise (iow, if you refuse to use the source), you could
> cheat and let "git diff" do the coloring for you, and then
> regexp replace the output.  You could even use the same coloring
> logic for normal diff if you did so.

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?
-- 
Jakub Narebski
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]