Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Avoid using git -C
Browse files Browse the repository at this point in the history
git -C has been added in Git 1.8.5, however some Linux distributions (e.g. Ubuntu Precise) and their packages still ship with older Git releases that don't support this option. I think it is safe to `cd` manually instead, it does the same thing.
  • Loading branch information
lukasbestle authored and sebastianbergmann committed Jan 23, 2017
1 parent fbb0e5f commit 0006b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Git.php
Expand Up @@ -126,7 +126,7 @@ public function isWorkingCopyClean()
*/
protected function execute($command)
{
$command = 'git -C ' . escapeshellarg($this->repositoryPath) . ' ' . $command;
$command = 'cd ' . escapeshellarg($this->repositoryPath) . '; git ' . $command;
if (DIRECTORY_SEPARATOR == '/') {
$command = 'LC_ALL=en_US.UTF-8 ' . $command;
}
Expand Down

0 comments on commit 0006b9e

Please sign in to comment.