From: Mark Ryden <hidden> Date: 2016-06-15 22:45:47
Hello,
I tried:
git apply patch1.txt
patch1.txt:34: trailing whitespace.
patch1.txt:53: trailing whitespace.
And
"git diff" show differences but **does not**
highlight anything.
I tried in tchs and in Bash.
Any ideas ? does "git diff" does highlight for anyone ?
Rgs,
Mark
On Wed, Dec 17, 2008 at 9:34 AM, Junio C Hamano [off-list ref] wrote:
"Mark Ryden" [off-list ref] writes:
quoted
1) Is there a way to check whether there are white spaces in this
file without running git-apply?
"sed -n -e '/^+.*[ ]$/p' patch.txt" perhaps?
quoted
2) Is there a way to get some messages about that there are white spaces
when creating a git patch?
Doesn't "git diff" highlight whitespace errors? That way, you can catch
errors before you make a commit that has them.
From: Mark Ryden <hidden> Date: 2016-06-15 22:45:47
Hello,
Thanks!
"git diff --check" indeed tells about trailing whitespace
Mark
On Wed, Dec 17, 2008 at 2:08 PM, Johannes Schindelin
[off-list ref] wrote:
Hi,
On Tue, 16 Dec 2008, Junio C Hamano wrote:
quoted
"Mark Ryden" [off-list ref] writes:
quoted
2) Is there a way to get some messages about that there are white
spaces when creating a git patch?
Doesn't "git diff" highlight whitespace errors? That way, you can catch
errors before you make a commit that has them.
Not to mention "git diff --check", which should catch them, too.
Ciao,
Dscho
From: Mark Ryden <hidden> Date: 2016-06-15 22:45:47
Thnks!
In fact, the first line was enough!
git config --global color.diff auto
Mark
On Wed, Dec 17, 2008 at 2:15 PM, Thomas Jarosch
[off-list ref] wrote:
On Wednesday, 17. December 2008 13:13:34 Mark Ryden wrote:
[colors in diff]
quoted
What do you mean ?
where ? how ?
This should do the trick:
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
Thomas