/**
  * Check if the current file path is a file and if so, if it has staged modifications.
  *
  * @param string        $path A path obtained via a prior call to AuthorExtractor::getFilePaths().
  *
  * @param GitRepository $git  The repository to extract all files from.
  *
  * @return bool
  */
 private function isDirtyFile($path, $git)
 {
     if (!is_file($path)) {
         return false;
     }
     $status = $git->status()->short()->getIndexStatus();
     $relPath = substr($path, strlen($git->getRepositoryPath()) + 1);
     if (isset($status[$relPath]) && $status[$relPath]) {
         return true;
     }
     return false;
 }
 /**
  * @covers \ContaoCommunityAlliance\BuildSystem\Repository\GitRepository::status
  * @covers \ContaoCommunityAlliance\BuildSystem\Repository\Command\StatusCommandBuilder::getStatus
  */
 public function testStatusOnUninitializedRepository()
 {
     $this->setExpectedException('ContaoCommunityAlliance\\BuildSystem\\Repository\\GitException');
     $this->uninitializedGitRepository->status()->getStatus();
 }