git.rst
changeset 2195 3556ec0e48be
parent 2190 f589976b8876
child 2209 6faf149a4f4c
--- a/git.rst	Mon Oct 09 13:37:12 2017 +0300
+++ b/git.rst	Mon Oct 09 14:42:32 2017 +0300
@@ -435,9 +435,23 @@
 To search in all history::
 
   $ git log -S$PATT
+  $ git log --pickaxe-regex=$PATT
   $ git log -G$PATT
   $ git grep -i PATT $(git rev-list --all) -- '*.[ch]'
 
+.. note::
+
+   ``-S`` search occurences in diff chunks, while ``-G`` detects changes in match count.
+
+https://git-scm.com/book/en/v2/Git-Tools-Searching
+  Git Tools - Searching.
+https://stackoverflow.com/questions/1337320/how-to-grep-git-commit-diffs-or-contents-for-a-certain-word
+  How to grep Git commit diffs or contents for a certain word?
+https://stackoverflow.com/questions/4468361/search-all-of-git-history-for-a-string
+  Search all of Git history for a string?
+https://stackoverflow.com/questions/2928584/how-to-grep-search-committed-code-in-the-git-history
+  How to grep (search) committed code in the git history?
+
 Find most recent tag for revision.
 ==================================
 ::