private static function escapeGitLogArgument($value)
{
// https://regex101.com/r/yP4yN9/3
// https://regex101.com/r/yM9wA2/3
// https://regex101.com/r/fM7uL3/1
$regex = ['/(\\\\|\\$)/', '/(\\.|\\[)/', '/(\\*)/'];
$replacements = ['\\\\\\\\\\\\$1', '\\\\$1', '.$1'];
return preg_replace($regex, $replacements, $value);
}