Mercurial > public > mercurial-scm > hg-stable
diff tests/test-grep.t @ 38650:eba69ddd4e52
grep: search working directory files by default if --all-files is specified
The default was -rtip:0 before, but "--all-files -rtip:0" would be the most
useless combination, and it isn't supported yet. Let's change the default to
something useful.
This isn't flagged as BC since --all-files isn't released.
Differential Revision: https://phab.mercurial-scm.org/D3917
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 11 Jul 2018 21:35:31 +0900 |
parents | 0d0f8bd692c4 |
children | 5e4027db52f4 |
line wrap: on
line diff
--- a/tests/test-grep.t Wed Jul 11 21:23:18 2018 +0900 +++ b/tests/test-grep.t Wed Jul 11 21:35:31 2018 +0900 @@ -412,6 +412,18 @@ $ hg grep -r "." "unmod" --all-files um:1:unmod +With --all-files, the working directory is searched by default + + $ echo modified >> new + $ hg grep --all-files mod + new:2147483647:modified + um:2147483647:unmod + + which can be overridden by -rREV + + $ hg grep --all-files -r. mod + um:1:unmod + --diff --all-files makes no sense since --diff is the option to grep history $ hg grep --diff --all-files um