The options -Sor -Gcan be used for git log. The difference between the two is that it -Stakes a fixed line (representing the line of code you want to match), while it -Gdoes the same thing, but takes a regular expression:
git log --oneline -S 'fixed string'
git log --oneline -G '^foobar$'
-S -G , , / . --patch -p, , .
Linux Kernel git log:
-S <string>
, <string>. , , diff; . gitdiffcore (7).
-G <regex>
, <regex>.
user456814