On Tue, Apr 2, 2013 at 2:43 PM, John Peterson <jwpeter...@gmail.com> wrote:
> On Tue, Apr 2, 2013 at 2:30 PM, Kirk, Benjamin (JSC-EG311) <
> benjamin.kir...@nasa.gov> wrote:
>
>> 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.
>>
>
> I've played around with emacs' whitespace cleanup stuff but I don't like
> it mainly because it removes all whitespace from a file you edit,
> generating huge diffs.
>
> So I switched to using pre-commit hooks in git.
>
> Name the following script "pre-commit", chmod a+x it, and save it in the
> .git/hooks directory of any git repo where you want to use it. The great
> thing is that it only cleans up whitespace from *your commit* not the
> entire file.
>
Argh, apparently that's not true all :(
I just tested it out on a file in the libmesh repo and it fixed all
whitespace in the file as well.
Not sure what I was thinking, other than I may have only tested the
pre-commit hook on files that didn't have whitespace?!
--
John
------------------------------------------------------------------------------
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