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.