--- a/mercurial/commands.py Fri Sep 11 12:39:45 2020 +0900
+++ b/mercurial/commands.py Thu Sep 10 13:30:34 2020 +0900
@@ -3357,7 +3357,11 @@
raise error.Abort(_(b'--diff and --all-files are mutually exclusive'))
if opts.get(b'all_files') is None and not diff:
opts[b'all_files'] = True
- plaingrep = opts.get(b'all_files') and not opts.get(b'rev')
+ plaingrep = (
+ opts.get(b'all_files')
+ and not opts.get(b'rev')
+ and not opts.get(b'follow')
+ )
all_files = opts.get(b'all_files')
if plaingrep:
opts[b'rev'] = [b'wdir()']