Cool throwaway feature of git diff’s. “Patch Hunk Headers”.
Basically any diff will regex backwards (depending on detected target language) and put the function or “something sensible” in front of the diff output. That way you can (likely) see if you are putting a print statement in “function foo()” or “function bar()” before committing.
Please use responsibly.
Very rarely do programs reach the level of tool, although I wish more would aspire to.
Do nothing more nor nothing less than I ask.
Do it well and without complaint.
Above all, be consistent.
…and very few others.
Coincidentally, most of these tools have a high learning curve. But perhaps not coincidentally, they are so powerful and consistent that the initial setup cost is dwarfed by their general utility.
Like what you just read? Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.
Thanks for Visiting!