diff options
author | Andrew Gallant <jamslam@gmail.com> | 2019-01-23 19:46:15 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2019-01-23 19:59:39 -0500 |
commit | 9c940b45f4f81b51eee7dcf5836fb3680cf6b62c (patch) | |
tree | 8a8814010eeeb6c69b9b248764bb19ee23001c57 /CHANGELOG.md | |
parent | 0a167021c36f6946fc586f4c76e66ab627f4cc04 (diff) |
globset: permit ** to appear anywhere
Previously, `man gitignore` specified that `**` was invalid unless it
was used in one of a few specific circumstances, i.e., `**`, `a/**`,
`**/b` or `a/**/b`. That is, `**` always had to be surrounded by either
a path separator or the beginning/end of the pattern.
It turns out that git itself has treated `**` outside the above contexts
as valid for quite a while, so there was an inconsistency between the
spec `man gitignore` and the implementation, and it wasn't clear which
was actually correct.
@okdana filed a bug against git[1] and got this fixed. The spec was wrong,
which has now been fixed [2] and updated[2].
This commit brings ripgrep in line with git and treats `**` outside of
the above contexts as two consecutive `*` patterns. We deprecate the
`InvalidRecursive` error since it is no longer used.
Fixes #373, Fixes #1098
[1] - https://public-inbox.org/git/C16A9F17-0375-42F9-90A9-A92C9F3D8BBA@dana.is
[2] - https://github.com/git/git/commit/627186d0206dcb219c43f8e6670b4487802a4921
[3] - https://git-scm.com/docs/gitignore
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a2d2dd4..78f7a5e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ Feature enhancements: Bug fixes: +* [BUG #373](https://github.com/BurntSushi/ripgrep/issues/373), + [BUG #1098](https://github.com/BurntSushi/ripgrep/issues/1098): + `**` is now accepted as valid syntax anywhere in a glob. * [BUG #1106](https://github.com/BurntSushi/ripgrep/issues/1106): `--files-with-matches` and `--files-without-match` work with one file. * [BUG #1093](https://github.com/BurntSushi/ripgrep/pull/1093): |