Skip to content

Commit d048cb1

Browse files
avargitster
authored andcommitted
grep & rev-list doc: stop promising libpcre for --perl-regexp
Stop promising in our grep & rev-list options documentation that we're always going to be using libpcre when given the --perl-regexp option. Instead talk about using "Perl-compatible regular expressions" and using these types of patterns using "a compile-time dependency". Saying "libpcre" means that we're talking about libpcre.so, which is always going to be v1. This change is part of an ongoing saga to add support for libpcre2, which comes with PCRE v2. In the future we might use some completely unrelated library to provide perl-compatible regular expression support. By wording the documentation differently and not promising any specific version of PCRE or even PCRE at all we have more wiggle room to change the implementation. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 072473e commit d048cb1

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Documentation/git-grep.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,11 @@ OPTIONS
161161

162162
-P::
163163
--perl-regexp::
164-
Use Perl-compatible regexp for patterns. Requires libpcre to be
165-
compiled in.
164+
Use Perl-compatible regular expressions for patterns.
165+
+
166+
Support for these types of regular expressions is an optional
167+
compile-time dependency. If Git wasn't compiled with support for them
168+
providing this option will cause it to die.
166169

167170
-F::
168171
--fixed-strings::

Documentation/rev-list-options.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ endif::git-rev-list[]
9292
pattern as a regular expression).
9393

9494
--perl-regexp::
95-
Consider the limiting patterns to be Perl-compatible regular expressions.
96-
Requires libpcre to be compiled in.
95+
Consider the limiting patterns to be Perl-compatible regular
96+
expressions.
97+
+
98+
Support for these types of regular expressions is an optional
99+
compile-time dependency. If Git wasn't compiled with support for them
100+
providing this option will cause it to die.
97101

98102
--remove-empty::
99103
Stop when a given path disappears from the tree.

0 commit comments

Comments
 (0)