Re: Strange diff behavior?
- From
- Matthias Lederhofer <matled@gmx.net>
- Date
- Jun 21, 2007, 06:50 UTC
- Message-ID
- <20070621065043.GA30521@moooo.ath.cx>
- In-Reply-To
- <31e9dd080706201802h9dcbffawd82575d09e082155@mail.gmail.com>
Jason Sewall <jasonsewall@gmail.com> 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 = trueSee also git-config(1) for more information on these and other configuration options.