mercurial/commands.py
changeset 45478 07c424a13811
parent 45476 453bc6ca9ab2
child 45486 ac7a3da0dbb6
--- 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()']