开发者

Search through git revisions for method call

We have a function in our code which isn't being called, but should be. We know it was being called in a version of our software released about 2 years ago.

So at some point in the past few thousand revisions of our code (in a git repository), this function call was removed, and we need to know when this was.

Is there a way to automatically search th开发者_运维技巧rough these revisions to find when that was, or will we need to do a manual binary search through the revisions?


You can use the Git "pickaxe":

git log -SYourFunctionName

This will show revisions where text containing YourFunctionName was either added or removed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜