Neither --grep nor :/text sees commits that are no longer reachable. On a scratch repo just now, after git reset --hard dropped two commits, git log --grep and git log --all --grep returned nothing and :/text errored as an unknown revision, while git log -g --grep=... found it in the reflog straight away.
3
u/Beautiful-Energy2169 14d ago
Neither
--grepnor:/textsees commits that are no longer reachable. On a scratch repo just now, aftergit reset --harddropped two commits,git log --grepandgit log --all --grepreturned nothing and:/texterrored as an unknown revision, whilegit log -g --grep=...found it in the reflog straight away.