Skip to content

Commit 9282a33

Browse files
committed
git-filter-repo.txt: regexes & globs apply to entire file, not to lines
Signed-off-by: Elijah Newren <[email protected]>
1 parent 93ee4ae commit 9282a33

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Documentation/git-filter-repo.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,9 +872,12 @@ YYYY-MM-DD. In the expressions file, there are a few things to note:
872872
globs (see https://docs.python.org/3/library/fnmatch.html), or regular
873873
expressions (see https://docs.python.org/3/library/re.html#regular-expression-syntax).
874874
If none of these are specified, `literal:` is assumed.
875-
* globs and regexes are applied to each line of the file; it is not
876-
possible with --replace-text to match a multi-line string.
877-
* If multiple matches are found on a line, all are replaced.
875+
* If multiple matches are found, all are replaced.
876+
* globs and regexes are applied to the entire file, but without any
877+
special flags turned on. Some folks may be interested in adding `(?m)`
878+
to the regex to turn on MULTILINE mode, so that `^` and `$` match the
879+
beginning and ends of lines rather than the beginning and end of file.
880+
See https://docs.python.org/3/library/re.html for details.
878881

879882
See also the `--blob-callback` from <<CALLBACKS>>.
880883

0 commit comments

Comments
 (0)