Let me re-express what LeGEC’s answer says, in a shorter way:1
-
There are two differences between
-Sand-G. -
One is string vs regexp (as you already noted).
-
The other is that
-Sdemands that the match occur a different number of times in the left and right (-and+) sides of the match.-Gmerely demands that the match occur in at least one of the two sides.
You can use --pickaxe-regex to eliminate the first difference, but not the second.
1Those who have read my long-form answers may now all be shocked. ?
0
solved Difference between git-log option -S and -G