4 ms·
Something not mentioned is git log -S"pattern" This is useful for searching diffs. If your repo is small this is quite fast. However for large repos, it can
by sdesol 13y ago
Something not mentioned is
git log -S"pattern"
This is useful for searching diffs. If your repo is small this is quite fast. However for large repos, it can be slow which is why I use my own diffs indexer. Below is a screenshot of what my diffs search looks like.
http://screenshots.gitsense.com/diffs-search.html http://screenshots.gitsense.com/diffs-search.html
For most people, git log -S should work fine but my solution is targeted for enterprise, which is why I went my own route.
- travisjeffery 13y agoI wrote the article. The article includes git log -G"pattern". git log -S"string" it limited to a string.
- sdesol 13y agoSorry about that. I just looked for -S as that's all that I ever use for performance reasons, but you are correct as you do mention a diff search example.
- js2 13y agoAs well, -S<string> only shows patches where the diff changes the number of occurrences of <string>. Thus if a patch both adds and removes <string>, it won't be shown by -S. -G<pattern> will show any patches where <pattern> occurs in the diff at all.