private function isDirtyFile($path, $git)
    {
        if (!\is_file($path)) {
            return false;
        }

        $status  = (array) $git->status()->short()->getIndexStatus();
        $relPath = (string) \substr($path, (\strlen($git->getRepositoryPath()) + 1));

        if (isset($status[$relPath]) && $status[$relPath]) {
            return true;
        }

        return false;
    }
private function isDirtyFile($path, $git)
    {
        if (!\is_file($path)) {
            return false;
        }

        $status  = (array) $git->status()->short()->getIndexStatus();
        $relPath = (string) \substr($path, (\strlen($git->getRepositoryPath()) + 1));

        if (isset($status[$relPath]) && $status[$relPath]) {
            return true;
        }

        return false;
    }
private function isDirtyFile ( $ path , $ git ) { if ( ! \ is_file ( $ path ) ) { return false ; } $ status = ( array ) $ git -> status ( ) -> short ( ) -> getIndexStatus ( ) ; $ relPath = ( string ) \ substr ( $ path , ( \ strlen ( $ git -> getRepositoryPath ( ) ) + 1 ) ) ; if ( isset ( $ status [ $ relPath ] ) && $ status [ $ relPath ] ) { return true ; } return false ; }
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
Check if the current file path is a file and if so if it has staged modifications .