Search through git revisions to call a method

We have a function in our code that is not called, but should be. We know that this was caused by a version of our software released about 2 years ago.

So, at some point in the last few versions of our code (in the git repository) this function call was deleted, and we need to know when it was.

Is there a way to automatically search for these changes to find out when it was, or do we need to perform a manual binary search through revisions?

+4
source share
1 answer

You can use git "pickaxe" :

git log -SYourFunctionName 

Versions in which text containing YourFunctionName been added or removed will be displayed here.

+7
source

All Articles