public function newTempFilename()
{
$dir = $this->tempdir . DIRECTORY_SEPARATOR . 'gush';
$this->fs->mkdir($dir);
$tmpName = tempnam($dir, '');
$this->tempFilenames[] = $tmpName;
return $tmpName;
}
public function commit($message, array $options = []) { $params = ''; foreach ($options as $option => $value) { if (is_int($option)) { $params[] = '-' . $value; } else { $params[] = '-' . $option; $params[] = $value; } } $tmpName = $this->filesystemHelper->newTempFilename(); file_put_contents($tmpName, $message); $this->processHelper->runCommand(array_merge(['git', 'commit', '-F', $tmpName], $params)); }