Re: diff display



On 2008-09-10 09:52, James A. Donald wrote:
Under windows, diff usually works like windiff - you see
the two versions side by side, with the differences
highlighted by color

git-gui, however gives me a diff where I see a single
stream annotated with + and -

I find the single stream display really obscure, ugly,
and confusing.

Linux's diff by default works this way, because most people here
consider it more easy to spot differences on longer lines, if they are
placed on top of each other. Tools like kdiff3 have a side by side view.
To obtain this result on the command line use diff's -y option.

I guess it just takes a bit of getting used to.

but with color highlighting instead of + and -

On the comand line you get color highlighting by means of git's --color
option. (See 'man git-diff'). These settings can be made permanent by
putting them in your .gitconf. As an example here is part of mine:

/-----
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = green reverse
local = blue
remote = yellow
[color "diff"]
meta = green bold
frag = magenta bold
old = red bold
new = blue bold
[color "status"]
added = blue bold
changed = yellow bold
untracked = cyan bold
\-----

I don't know, if this will activate colors for the gui, though. (Just
tried it myself: at least I get colors on lenny.)

Can I get file changes recorded in git to display the
way they do in windows?

</rhetorical question>
If you insist that things in linux should be just like in windows, why
bother using linux?
<rhetorical question>

Sorry I can't help you with your side-by-side issue. I'm sure it
wouldn't be to difficult to write a little script that temporarily
clones a certain state of your git project to a different file location
and invokes kdiff3 on the tree and it's copy.

HTH,

Johannes


Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: Edit component that displays control codes/non-printable characters
    ... How about something similar to rich text or syntax ... E.g. all "symbols" (CR, Tab etc.) would ... be be printed in bold. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Bold date
    ... I've tried highlighting that portion of the formula and using the ... >cell format button, as well as the bold button, but they are both grayed out. ...
    (microsoft.public.excel.worksheet.functions)
  • RE: radio button text bold when clicked
    ... not defined and highlighting "but =" ... I am running excel 2007 and placed your code in the worksheet module. ... bold when clicked/filled not specific to to just one option button. ...
    (microsoft.public.excel.programming)
  • Re: [PHP] highlighting searchterms as bold text
    ... highlighting searchterms as bold text ... I tried pattern /^ethyl/i but this does not highlight anything. ...
    (php.general)
  • icons on desktops
    ... How do i remove the bold bit underneath the icons on my desktop. ... It used to be just writing,now the name is surrounded by a big blue bold bit and I dont like it. ...
    (microsoft.public.windowsxp.customize)