[Updated] D8581: grep: test that paths get audited
valentin.gatienbaron (Valentin Gatien-Baron)
phabricator at mercurial-scm.org
Tue May 26 16:55:18 UTC 2020
valentin.gatienbaron updated this revision to Diff 21486.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8581?vs=21468&id=21486
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8581/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8581
AFFECTED FILES
tests/test-grep.t
CHANGE DETAILS
diff --git a/tests/test-grep.t b/tests/test-grep.t
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -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
To: valentin.gatienbaron, #hg-reviewers, marmoute
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200526/97c8c8ed/attachment-0002.html>
More information about the Mercurial-patches
mailing list