I am contributing code to an open source project which requires that no tabs exist in source code(only spaces). I am sure I have used tabs accidentally in some places, and want to clean up my code before I submit a patch. How can I find uses of tabs in a commit range?
Share
For commits you haven’t pushed yet, you can use filter-branch:
See this SO question for a concrete example
(that is for all commits, you need to restrict it for a range of commit, see
git filter-branchman page)For future commits, use a filter driver
Use the ‘
clean‘ step to cleanup tabs.