You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #5914 (comment), we have a fairly large number of places in our test suite where we perform grep(1) commands using regular expressions in which we have not fully escaped all the meta-characters like . and *.
For instance, this check in a test from t/t-migrate-export.sh aims to confirm that git lfs track outputs the expected "*.jpg" already supported message:
However, this would match if the message contained the string XYZjpg" already supported or Zjpg" already supported (but not jpg" already supported) because the "* matches zero or more " characters, and the . matches any character.
System environment
The examples above were performed on macOS, but should behave the same way on any platform.
Output of git lfs env
git-lfs/3.5.1 (GitHub; darwin arm64; go 1.22.1)
git version 2.47.0
Additional context
There are a significant number of these kinds of oversights in our tests' regular expressions, mostly involving meta-characters like . and *, since those are frequently used in filenames and shell wildcards.
The text was updated successfully, but these errors were encountered:
Describe the issue
As mentioned in #5914 (comment), we have a fairly large number of places in our test suite where we perform
grep(1)
commands using regular expressions in which we have not fully escaped all the meta-characters like.
and*
.For instance, this check in a test from
t/t-migrate-export.sh
aims to confirm thatgit lfs track
outputs the expected"*.jpg" already supported
message:However, this would match if the message contained the string
XYZjpg" already supported
orZjpg" already supported
(but notjpg" already supported
) because the"*
matches zero or more"
characters, and the.
matches any character.System environment
The examples above were performed on macOS, but should behave the same way on any platform.
Output of
git lfs env
Additional context
There are a significant number of these kinds of oversights in our tests' regular expressions, mostly involving meta-characters like
.
and*
, since those are frequently used in filenames and shell wildcards.The text was updated successfully, but these errors were encountered: