diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3396,6 +3396,9 @@ getfile = util.lrucachefunc(repo.file) + if (not pats and ui.configbool("grep", "pwd")): + pats = ('.',) + def matchlines(body): begin = 0 linenum = 0