Re: Strange diff behavior?

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

 



As I mentioned in the ps, I git-diff --check shows nothing. As a
matter of fact, I do have color turned on and the pluses are green and
minuses red, but there are none of the characteristic red blocks that
trailing whitespace makes.

On 6/20/07, Matthias Lederhofer <matled@xxxxxxx> wrote:
Jason Sewall <jasonsewall@xxxxxxxxx> wrote:
> It seems like every change listed after the first one is meaningless.
> I really think I just don't understand something about the diff
> algorithm. Can someone tell my why those empty lines are recorded as
> changes?

This are whitespace changes.

    $ git diff --color

marks whitespaces at the end of the line with a red background color
so you can see what changed.  I also use vim with :set list to see
whitespace changes, e.g.

    $ git diff | vim -c 'set list' -

If you like to have colors (not just in diff) permnanently you can add
this to your .git/config or ~/.gitconfig:

    [color]
        branch = auto
        diff = auto
        status = auto
        pager = true

See also git-config(1) for more information on these and other
configuration options.

-
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]

  Powered by Linux