Find when code appeared or disappeared
find_changeTrace when a code pattern was introduced or removed in a Git repository by returning commits where its occurrence count changed.
Instructions
Find when a piece of code appeared or disappeared using git's pickaxe (log -S): returns the commits where the number of occurrences of the pattern changed, i.e. the code was actually added or removed (unlike -G, which also matches lines that merely moved). Great for "when was this constant/function introduced?" forensics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Optional file (relative to the repository root) to restrict the search to; followed across renames. | |
| limit | No | Maximum number of commits to return. | |
| regex | No | Use git's -G (regex matched against changed lines, also catches edits and moves) instead of the -S pickaxe. | |
| pattern | Yes | Exact code snippet or identifier to track, e.g. 'MAGIC_TOKEN' (a regex only when regex=true). | |
| repo_path | Yes | Absolute path to a local git repository, or to any folder inside one (a sub-folder scopes the analysis to it). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||