I want to run git stripspace
on all my source code files, on each build (or precommit or just manually), to remove extraneous whitespace, and later maybe to format the code in a standard way,
So I want to do something like
git stripspace < project/code.m > project/code.m
so I thought I should be able to use find -exec
or xargs
but by the looks of find
does not like 'git stripspace' (maybe because of the space in between or the < or >) and I don't know how to pass the same file name, same argument, twice in a row with the proper redirections (< >) .
project/code.m
first to prepare the output pipe from the>
before it tries to read it. – Shadur-don't-feed-the-AI Jul 26 '13 at 04:48