Re: white spaces in a patch
- From
- Mark Ryden <markryde@gmail.com>
- Date
- Dec 17, 2008, 11:44 UTC
- Message-ID
- <dac45060812170344u368ffd7fx4e86253b4a13ffc7@mail.gmail.com>
- In-Reply-To
- <7vej07p84i.fsf@gitster.siamese.dyndns.org>
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 <gitster@pobox.com> wrote:
Show 13 quoted lines
> "Mark Ryden" <markryde@gmail.com> writes: > >> 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? > >> 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. >