# HG changeset patch # User Valentin Gatien-Baron # Date 2020-05-25 21:29:38 # Node ID 3db660b8eba640bb0f64890446dc63c7d2f84c1f # Parent 5fe8f02ced6d75fd2afd2abcae754aed511dabbb grep: add test coverage of behavior on symlinks Differential Revision: https://phab.mercurial-scm.org/D8580 diff --git a/tests/test-grep.t b/tests/test-grep.t --- a/tests/test-grep.t +++ b/tests/test-grep.t @@ -666,7 +666,15 @@ Existing tracked files in the working di new:modified um:unmod - which can be overridden by -rREV +#if symlink +Grepping a symlink greps its destination + + $ rm -f added; ln -s symlink-added added + $ hg grep '' | grep added + added:symlink-added +#endif + +But we can search files from some other revision with -rREV $ hg grep -r. mod um:1:unmod