git log -S 'calculate_total' --oneline

Category: Git - Core

git log -S 'calculate_total' --oneline

Find commits that changed a string count

The pickaxe -S option lists commits where the number of occurrences of the given string changed. It catches additions, removals, and renames of a function or constant. Add --pickaxe-regex to treat the argument as a regular expression.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.