changeset 44923:06105aa8bc0e

grep: test that paths get audited Differential Revision: https://phab.mercurial-scm.org/D8581
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
date Mon, 25 May 2020 17:32:25 -0400
parents 3db660b8eba6
children 233ee525dcef
files tests/test-grep.t
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-grep.t	Mon May 25 17:29:38 2020 -0400
+++ b/tests/test-grep.t	Mon May 25 17:32:25 2020 -0400
@@ -672,6 +672,15 @@
   $ rm -f added; ln -s symlink-added added
   $ hg grep '' | grep added
   added:symlink-added
+
+But we reject symlinks as directories components of a tracked file as
+usual:
+
+  $ mkdir dir; touch dir/f; hg add dir/f
+  $ rm -rf dir; ln -s / dir
+  $ hg grep ''
+  abort: path 'dir/f' traverses symbolic link 'dir'
+  [255]
 #endif
 
 But we can search files from some other revision with -rREV