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
The regular expression for parsing lines of output from the git branch command assumes that all short hashes will be exactly 7 characters, but this is not always the case.
The specific line is at src/PHPGit/Command/BranchCommand.php:67:
The regular expression for parsing lines of output from the git branch command assumes that all short hashes will be exactly 7 characters, but this is not always the case.
The specific line is at src/PHPGit/Command/BranchCommand.php:67:
Suggest changing the hash capturing group to
(?<hash>[0-9a-z]{7,40})
to handle all possible cases.Additionally, the result of
preg_match
should probably be checked to see if it succeeded, and either continue the loop or throw an exception?The text was updated successfully, but these errors were encountered: