OK, at risk of entering dangerous territory…

I've been using John's recommended git config flags, and have become ashamed of 
the amount of trailing whitespace I leave in source files.

Consequently, I've added 

;--------------------------------------------------
; remove trailing whitespace
(add-hook 'before-save-hook 'delete-trailing-whitespace)

to my ~/.emacs, which is awesome.

Problem is, I'm about to make some serious & important libMesh changes, and I 
don't want them swamped by a bunch of simultaneous trivial diffs in the same 
file (read: don't wanna piss off Roy).

I've come up with a gem of a make rule that'll clean our source tree:

# this rule invokes emacs on each source file to remove trailing whitespace.
remove-trailing-whitespace:
        for file in `find $(srcdir)/{src,include,examples} -name "*.C" -o -name 
"*.h" -o -name Makefile.am -type f` ; do \
          echo $$file ; \
          emacs -batch $$file --eval '(delete-trailing-whitespace)' -f 
save-buffer 2>/dev/null ; \
        done

Any objections to a massive, whitespace-only commit?

Keep in mind this may unnecessarily complicate merging with any in-work 
projects…

-Ben


------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to