mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-07-03 17:05:39 +02:00
git-filter-repo.txt: regexes & globs apply to entire file, not to lines
Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
93ee4ae907
commit
9282a33a02
|
@ -872,9 +872,12 @@ YYYY-MM-DD. In the expressions file, there are a few things to note:
|
||||||
globs (see https://docs.python.org/3/library/fnmatch.html), or regular
|
globs (see https://docs.python.org/3/library/fnmatch.html), or regular
|
||||||
expressions (see https://docs.python.org/3/library/re.html#regular-expression-syntax).
|
expressions (see https://docs.python.org/3/library/re.html#regular-expression-syntax).
|
||||||
If none of these are specified, `literal:` is assumed.
|
If none of these are specified, `literal:` is assumed.
|
||||||
* globs and regexes are applied to each line of the file; it is not
|
* If multiple matches are found, all are replaced.
|
||||||
possible with --replace-text to match a multi-line string.
|
* globs and regexes are applied to the entire file, but without any
|
||||||
* If multiple matches are found on a line, all are replaced.
|
special flags turned on. Some folks may be interested in adding `(?m)`
|
||||||
|
to the regex to turn on MULTILINE mode, so that `^` and `$` match the
|
||||||
|
beginning and ends of lines rather than the beginning and end of file.
|
||||||
|
See https://docs.python.org/3/library/re.html for details.
|
||||||
|
|
||||||
See also the `--blob-callback` from <<CALLBACKS>>.
|
See also the `--blob-callback` from <<CALLBACKS>>.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user