From: Junio C Hamano Date: Mon, 27 Feb 2006 00:45:42 GMT Subject: Re: the war on trailing whitespace Message-ID: <7vr75p4ojt.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: > Personally, I don't mind whitespace that much. In particular, I _suspect_ > I often have empty lines like > > int i; > > i = 10; > > where the "empty" line actually has the same indentation as the lines > around it. Is that wrong? Perhaps. Yes, you do, and I hand-fixed one a couple of minutes ago ;-). Regarding git-apply change, I suspect warn_on_whitespace should not squelch itself after the first one, and error_on_whitespace should not die instantly. The sample pre-applypatch hook (it was missing code to figure out where GIT_DIR was so it never worked as shipped; corrected in "master") shows line numbers of suspicious lines from the files being patched. They can be manually fixed up, and then "git am --resolved", if the integrator is in a better mood. The error messages from pre-commit/pre-applypatch hook mimic the way compiler errors are spit out, so that it works well in Emacs compilation buffer -- doing C-x ` (next-error) takes you the line the error appears and lets you edit it.